Skip to content

[Fix] scheduler: Record weight version events on every request list - #43909

Merged
hnyls2002 merged 5 commits into
mainfrom
lsyin/sched-pr15
Nov 3, 2026
Merged

hnyls2002 merged 5 commits into
mainfrom
lsyin/sched-pr15

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Readers that collect live requests by hand take them from Scheduler.request_lists().

  • Fixes the weight version update missing requests outside the running batches: record_weight_version_change recorded events only on requests in batch snapshots, the waiting queue, the chunked slot, deferred responses and HiSparse staging, so a request waiting for its grammar, in a PD queue, in the dLLM queue or in a parked uOCR window got no weight-version event. It now records on every request in every list.
  • Queue gauges and load read their lists from request_lists() by kind: the waiting, grammar and PD prefill gauges, copied in the prefill, decode and idle reports, become one _update_queue_stats; get_loads reads the PD queues by kind and drops three queue getters.

Behavior change: the fix above.

Test plan

  • test_records_on_every_request_list: requests in the running, waiting, chunked, grammar and PD sending lists each get the event (the grammar and PD sending ones fail before the fix).
  • The unit tests under test/registered/unit/{managers,disaggregation,lora,utils,dllm,observability} pass locally with SGLANG_IS_IN_CI=1, apart from failures the base has too.

CI States

Latest PR Test (Base): 🚫 Run #41605782929
Latest PR Test (Extra): ❌ Run #41605782910
Latest PR Test (AMD ROCm 10): ❌ Run #41605782777

Tip

Base CI only covers the core cases, and its workload may not exercise your change. Use /rerun-test to run the tests your change touches, or copy this prompt for an agent:

Find the registered tests this PR affects and run them with /rerun-test, following https://github.com/sgl-project/sglang/blob/main/.agents/skills/rerun-test/SKILL.md

@hnyls2002
hnyls2002 marked this pull request as draft October 13, 2026 02:01
@hnyls2002 hnyls2002 changed the title [Test] Record the call order of every event loop on a fake scheduler [Fix] scheduler: Record weight version events on every request list Nov 3, 2026
@hnyls2002
hnyls2002 force-pushed the lsyin/sched-pr15 branch 3 times, most recently from 1caae25 to c1a20ee Compare November 3, 2026 07:20
@github-actions github-actions Bot added the hicache Hierarchical Caching for SGLang label Nov 3, 2026
@hnyls2002
hnyls2002 force-pushed the lsyin/sched-pr15 branch 4 times, most recently from 42daa46 to 411dba1 Compare November 3, 2026 07:34
@hnyls2002
hnyls2002 force-pushed the lsyin/sched-pr15 branch 2 times, most recently from 8a5008d to bbfae1f Compare November 3, 2026 07:48
@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/rerun-test test_metrics.py test_priority_metrics.py registered/disaggregation/test_disaggregation_basic.py test_utils_update_weights.py test_load_snapshot_server.py test_prefill_complete_allocation.py test_disaggregation_optimistic_prefill.py test_update_weights_from_tensor.py test_update_weights_from_distributed.py test_weight_version_spans.py

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🚀 1-gpu-5090 (3 tests): ✅ View workflow run

cd test/ && python3 registered/observability/test_metrics.py
cd test/ && python3 registered/observability/test_priority_metrics.py
cd test/ && python3 registered/rl/test_update_weights_from_tensor.py

🚀 2-gpu-h100 (6 tests): ✅ View workflow run

cd test/ && python3 registered/disaggregation/test_disaggregation_basic.py
cd test/ && python3 registered/scheduler/test_load_snapshot_server.py
cd test/ && python3 registered/e2e/disaggregation/test_prefill_complete_allocation.py
cd test/ && python3 registered/disaggregation/test_disaggregation_optimistic_prefill.py
cd test/ && python3 registered/rl/test_update_weights_from_distributed.py
cd test/ && python3 registered/rl/test_weight_version_spans.py

🚀 1-gpu-h100 (1 test): ❌ View workflow run

cd test/ && python3 registered/model_loading/test_utils_update_weights.py

@hnyls2002
hnyls2002 marked this pull request as ready for review November 3, 2026 07:55

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

Base automatically changed from lsyin/sched-pr14 to main November 3, 2026 08:45
@hnyls2002 hnyls2002 added the run-ci CI: run the baseline test suite on this PR label Nov 3, 2026
@hnyls2002
hnyls2002 merged commit 12e741c into main Nov 3, 2026
115 of 147 checks passed
@hnyls2002
hnyls2002 deleted the lsyin/sched-pr15 branch November 3, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hicache Hierarchical Caching for SGLang run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant