Fix num_running_reqs gauge on disagg prefill servers (#31495)
Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu>
This commit is contained in:
@@ -635,6 +635,16 @@ class SchedulerMetricsReporter:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Basics
|
# Basics
|
||||||
|
if (
|
||||||
|
self.scheduler.disaggregation_mode == DisaggregationMode.PREFILL
|
||||||
|
and batch is not None
|
||||||
|
):
|
||||||
|
# running_batch is never populated in PD prefill, so count the
|
||||||
|
# current forward batch instead.
|
||||||
|
self.stats.num_running_reqs = QueueCount.from_reqs(
|
||||||
|
batch.reqs, priority_enabled
|
||||||
|
)
|
||||||
|
else:
|
||||||
self.stats.num_running_reqs = prefill_stats.num_running_reqs
|
self.stats.num_running_reqs = prefill_stats.num_running_reqs
|
||||||
self.stats.num_queue_reqs = QueueCount.from_reqs(
|
self.stats.num_queue_reqs = QueueCount.from_reqs(
|
||||||
self.scheduler.waiting_queue, priority_enabled
|
self.scheduler.waiting_queue, priority_enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user