inference/research
verifiedhigh · 0.93updated 2026-10-05

SGLang metrics_reporter._calculate_utilization - the in-source TODO that pins sglang:utilization at 0

repo

Fields

id
sources/w3m-sglang-metrics-reporter-dead-utilization
Publisher
sgl-project/sglang
Kind
repo
Accessed
2026-10-05
notes
python/sglang/srt/managers/scheduler_components/metrics_reporter.py on main, 2026-10-04, method _calculate_utilization at line 1251. Verbatim body: `if self.scheduler.disaggregation_mode == DisaggregationMode.PREFILL: self.stats.utilization = -1` else a comment reading '# TODO: max_running_requests_under_SLO has no setter - sglang:utilization stuck at 0 (regressed #22713).' then `max_under_slo = getattr(self.scheduler, "max_running_requests_under_SLO", None)` and only `if max_under_slo is not None and max_under_slo > 0:` does it assign. The paired setter side is in python/sglang/srt/managers/scheduler.py line 1250: '# TODO: max_running_requests_under_SLO has no setter - dead chain.' with max_running_requests_under_SLO=None. Both metrics therefore exist and are exported, and both are structurally pinned: utilization at 0 outside prefill mode and at -1 on a prefill worker, max_running_requests_under_SLO at 0. The call sites are at lines 858 and 1104, confirming the method really runs rather than being dead code itself. | 2026-10-05 PATH SWEEP: STALE PATH FIXED. The bare 'managers/scheduler.py' resolved to nothing in the sglang tree; the real file is python/sglang/srt/managers/scheduler.py (confirmed present via the authenticated contents API for python/sglang/srt/managers). Written in full so the next reader can click it without having to guess the python/ prefix.

Notes

python/sglang/srt/managers/scheduler_components/metrics_reporter.py on main, 2026-10-04, method _calculate_utilization at line 1251. Verbatim body: `if self.scheduler.disaggregation_mode == DisaggregationMode.PREFILL: self.stats.utilization = -1` else a comment reading '# TODO: max_running_requests_under_SLO has no setter - sglang:utilization stuck at 0 (regressed #22713).' then `max_under_slo = getattr(self.scheduler, "max_running_requests_under_SLO", None)` and only `if max_under_slo is not None and max_under_slo > 0:` does it assign. The paired setter side is in python/sglang/srt/managers/scheduler.py line 1250: '# TODO: max_running_requests_under_SLO has no setter - dead chain.' with max_running_requests_under_SLO=None. Both metrics therefore exist and are exported, and both are structurally pinned: utilization at 0 outside prefill mode and at -1 on a prefill worker, max_running_requests_under_SLO at 0. The call sites are at lines 858 and 1104, confirming the method really runs rather than being dead code itself. | 2026-10-05 PATH SWEEP: STALE PATH FIXED. The bare 'managers/scheduler.py' resolved to nothing in the sglang tree; the real file is python/sglang/srt/managers/scheduler.py (confirmed present via the authenticated contents API for python/sglang/srt/managers). Written in full so the next reader can click it without having to guess the python/ prefix.

Cross-references

This record references no other records.