-
Notifications
You must be signed in to change notification settings - Fork 62
feat: add test framework for classifier with dependency injection #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add test framework for classifier with dependency injection #57
Conversation
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
@aeft thanks for contributing! can you sign DCO and run
|
Signed-off-by: Alex Wang <[email protected]>
Signed-off-by: Alex Wang <[email protected]>
Signed-off-by: Alex Wang <[email protected]>
00acea6
to
41213b1
Compare
Signed-off-by: Alex Wang <[email protected]>
41213b1
to
69e8e92
Compare
@@ -0,0 +1,408 @@ | |||
package classification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you toggle this test through golang tags? So we can run both mock and real inference in CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean I should add something like
//go:build !integration
// +build !integration
so that we can toggle these tests with -tags=integration
when we want to run real inference?
If that’s the case, would you prefer the tag name to be integration
, or should I use another name that matches our project’s convention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, something like. You can choose a tag like mock, bert, etc that explains the nature of the tests
Signed-off-by: Alex Wang <[email protected]>
d8efbb7
to
39911f4
Compare
Hi. This PR is ready for review. The unit tests have passed, and I also tested it with the real model (using |
If this PR looks good, my next plan is to improve the unit tests for the remaining methods in classifier.go. |
@aeft sounds good! when you have additional tests, please use tags so we know which tests are tested in what condition. Thanks |
@rootfs Thanks for your review! I want to confirm whether this aligns with your expectations (since this convention doesn't seem to be established in the project yet, I wanted to check with you. Thanks): We can add For real inference-based tests, we can later add |
![]() @rootfs Would you like to only enable "allow squash merging" in the project settings? This might make the commit history more readable. (Sorry. I assumed the merge would squash commits, so some of my commit messages are a bit vague.) |
Yes, that looks good |
What type of PR is this?
feat(classifier): add unit tests
What this PR does / why we need it:
Add Ginkgo test framework for the classifier component with proper dependency injection pattern.
Which issue(s) this PR fixes:
Fixes #45
Release Notes: No