Skip to content

Conversation

@yuluo-yx
Copy link
Contributor

@yuluo-yx yuluo-yx commented Sep 6, 2025

  1. optimize semantic-router/util/classification

@netlify
Copy link

netlify bot commented Sep 6, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 6b8adde
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/68bc30f42372050008df00c0
😎 Deploy Preview https://deploy-preview-67--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Sep 6, 2025

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned:

📁 src

Owners: @rootfs, @Xunzhuo, @wangchen615
Files changed:

  • src/semantic-router/pkg/utils/classification/classifier.go
  • src/semantic-router/pkg/utils/classification/classifier_test.go

This comment was automatically generated based on the OWNER files in the repository.

Copy link
Member

@Xunzhuo Xunzhuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you give it a simple conclusion of what you optimized for classifier?

@yuluo-yx
Copy link
Contributor Author

yuluo-yx commented Sep 6, 2025

can you give it a simple conclusion of what you optimized for classifier?

sure,

  1. i delete the contains func, which the go slices library includes.
  2. extracted the forEachModelScore func because the line for _, modelScore := range cat.ModelScores { appears four times in the file, which is not concise.
  3. extracted updateBestModel func.

@Xunzhuo
Copy link
Member

Xunzhuo commented Sep 6, 2025

ok thanks! can you separate the ut to another pr which is easier to go ahead, and remember to sign your commit

@Xunzhuo
Copy link
Member

Xunzhuo commented Sep 6, 2025

and add ut around your code polish in this PR to make sure things go in expectations.

yuluo-yx and others added 7 commits September 6, 2025 18:22
Signed-off-by: bitliu <[email protected]>
Signed-off-by: yuluo-yx <[email protected]>
Signed-off-by: bitliu <[email protected]>
Signed-off-by: yuluo-yx <[email protected]>
Signed-off-by: bitliu <[email protected]>
Signed-off-by: yuluo-yx <[email protected]>
Signed-off-by: bitliu <[email protected]>
Signed-off-by: yuluo-yx <[email protected]>
Update comment to improve clarity and correctness.

Signed-off-by: yuluo-yx <[email protected]>
@yuluo-yx yuluo-yx force-pushed the 0906-yuluo/optimize branch from d1d902e to d612c34 Compare September 6, 2025 10:22
@yuluo-yx
Copy link
Contributor Author

yuluo-yx commented Sep 6, 2025

and add ut around your code polish in this PR to make sure things go in expectations.

hi I split ttft ut to #68, pls

@yuluo-yx yuluo-yx changed the title feat: optimize classifier and add ttft unit test feat: optimize classifier Sep 6, 2025
@Xunzhuo Xunzhuo changed the title feat: optimize classifier feat: code polish on classifier Sep 6, 2025
@Xunzhuo Xunzhuo merged commit 3919a1c into vllm-project:main Sep 6, 2025
9 of 10 checks passed
@yuluo-yx yuluo-yx deleted the 0906-yuluo/optimize branch September 6, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants