[Schedule] bug fix for schedule enhancer#15834
[Schedule] bug fix for schedule enhancer#15834iforgetmyname merged 1 commit intosgl-project:ifmn/eagle-dp-attnfrom
Conversation
Summary of ChangesHello @liupeng374, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a bug within the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses a bug in the scheduler enhancer by increasing the max_stable_count from 30 to 200. This change makes the scheduler wait longer before allowing new prefill requests when there is a load imbalance across data parallel units, thus prioritizing decode operations for a longer period to help stabilize the load. My review focuses on improving the maintainability of this change. I've suggested making the new threshold value a named constant to avoid magic numbers and improving the clarity of the associated comment.
| # If scheduling is performed 200 times and some dp units are still at full load, the prefill-prioritized scheduling strategy will still be used. | ||
| self.max_stable_count = 200 |
There was a problem hiding this comment.
The value 200 is a magic number, which can make the code harder to understand and maintain. It would be better to define it as a named constant at the top of the file, for example: _MAX_STABLE_COUNT = 200. In the long term, making this a configurable server argument would provide more flexibility.
Additionally, the comment on line 18 could be clearer. The current logic blocks prefill when there's load imbalance and allows it again after max_stable_count cycles to prevent starvation. A more descriptive comment would be helpful.
| # If scheduling is performed 200 times and some dp units are still at full load, the prefill-prioritized scheduling strategy will still be used. | |
| self.max_stable_count = 200 | |
| # If load imbalance persists for `max_stable_count` cycles, prefill is allowed again to prevent starvation. | |
| self.max_stable_count = 200 |
…glang into eagle-sche * 'ifmn/eagle-dp-attn' of https://github.com/sgl-project/sglang: (22 commits) dp scheduler enhance support with chunked prefill (sgl-project#16071) modify suffix decoding CI dependency update (sgl-project#16063) fix rotary_embedding init npu (sgl-project#16011) feat: bugfix and accuracy fix for stablelm2_1_6b (sgl-project#15932) Update model and feature support for Ascend NPU (sgl-project#16005) Bugfix for Llama4 (sgl-project#15929) Bugfix for ds-vl2 (sgl-project#15894) gme qwen vl runners fix (sgl-project#15899) add profiling in scheduler (sgl-project#15876) llama use triton rope op (sgl-project#15855) suffix decoding adapt npu suffix decoding adapt npu Add suffix decoding speculative algorithm from feature 13553 cherry sgl-project#15434: qwen3 vl performance update cherry sgl-project#15597: fix Qwen3-VL-30B-A3B-Instruct accuracy loss [Schedule] bug fix for schedule enhancer (sgl-project#15834) minilb support roundrobin (sgl-project#15824) fix torchair compile issue cherry sgl-project#15187: lora fix ... # Conflicts: # python/sglang/srt/managers/scheduler.py # python/sglang/srt/managers/scheduler_enhancer.py
Motivation
Modifications
Accuracy Tests
Benchmarking and Profiling
Checklist