[BugFix] fix get_request from scheduler#5369
Merged
Jiang-Jia-Jun merged 1 commit intoPaddlePaddle:developfrom Dec 4, 2025
Merged
[BugFix] fix get_request from scheduler#5369Jiang-Jia-Jun merged 1 commit intoPaddlePaddle:developfrom
Jiang-Jia-Jun merged 1 commit intoPaddlePaddle:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug in the v1 scheduler where long requests (those exceeding max_num_batched_tokens) could not be processed from the InferScheduler, causing an infinite loop.
Key Changes
- Added
len(reqs) > 0condition to line 862 insplitwise_scheduler.pyto allow the first request to be processed even when it exceedsmax_num_batched_tokens - This prevents the scheduler from repeatedly pushing back and re-attempting to process the same long request
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5369 +/- ##
==========================================
Coverage ? 59.79%
==========================================
Files ? 325
Lines ? 40286
Branches ? 6100
==========================================
Hits ? 24090
Misses ? 14294
Partials ? 1902
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for your contribution! |
Jiang-Jia-Jun
approved these changes
Dec 4, 2025
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.
Motivation
修复v1调度下从 splitwise_scheduler 拉不到长请求的问题
v1调度设置scheduler_config.max_num_batched_tokens为8192
基于scheduler_config.max_num_batched_tokens来从 splitwise_scheduler 拉取请求
Modifications
修改 splitwise_scheduler
Usage or Command
无
Accuracy Tests
无
Checklist
[FDConfig],[APIServer],[Engine],[Scheduler],[PD Disaggregation],[Executor],[Graph Optimization],[Speculative Decoding],[RL],[Models],[Quantization],[Loader],[OP],[KVCache],[DataProcessor],[BugFix],[Docs],[CI],[Optimization],[Feature],[Benchmark],[Others],[XPU],[HPU],[GCU],[DCU],[Iluvatar],[Metax]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.