[Cleanup] Move scheduler get_routed_experts logic to separate method#32706
Merged
yewentao256 merged 1 commit intovllm-project:mainfrom Jan 22, 2026
Merged
[Cleanup] Move scheduler get_routed_experts logic to separate method#32706yewentao256 merged 1 commit intovllm-project:mainfrom
get_routed_experts logic to separate method#32706yewentao256 merged 1 commit intovllm-project:mainfrom
Conversation
Also ensure that we always return the final output for a request, even if otherwise empty. Signed-off-by: Nick Hill <nickhill123@gmail.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the logic for retrieving routed experts into a dedicated private method, _get_routed_experts, improving the readability and modularity of the update_from_output method. Additionally, it includes a small but important change to ensure that EngineCoreOutput is always generated for stopped requests, even if no new tokens or other outputs are present, which enhances the completeness of the final output.
yewentao256
approved these changes
Jan 22, 2026
Member
yewentao256
left a comment
There was a problem hiding this comment.
LGTM, thanks for the work!
monajafi-amd
pushed a commit
to monajafi-amd/vllm
that referenced
this pull request
Jan 23, 2026
vllm-project#32706) Signed-off-by: Nick Hill <nickhill123@gmail.com> Signed-off-by: mohammad najafi <mohammad.najafi@amd.com>
cwazai
pushed a commit
to cwazai/vllm
that referenced
this pull request
Jan 25, 2026
vllm-project#32706) Signed-off-by: Nick Hill <nickhill123@gmail.com> Signed-off-by: 陈建华 <1647430658@qq.com>
lapy
pushed a commit
to lapy/vllm
that referenced
this pull request
Jan 27, 2026
vllm-project#32706) Signed-off-by: Nick Hill <nickhill123@gmail.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-on from #28284 which I didn't get time to fully review.
It harms readability to have all of this special-case logic in the main scheduler flow, better to move it to a separate method.
Also includes small change to ensure that we always return the final output for a request, even if otherwise empty.