From 5c440cdc41f704bb0beeda4a4302d17f491bd4aa Mon Sep 17 00:00:00 2001 From: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com> Date: Sat, 16 May 2026 09:21:00 +0800 Subject: [PATCH] =?UTF-8?q?Lift=20running=5Fbatch=20/=20running=5Fmbs=20ac?= =?UTF-8?q?cess=20=E2=80=94=20direct=20+=20PP-explicit=20(#25439)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/sglang/srt/observability/scheduler_metrics_mixin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/observability/scheduler_metrics_mixin.py b/python/sglang/srt/observability/scheduler_metrics_mixin.py index ecd8bfa8a..9d949b938 100644 --- a/python/sglang/srt/observability/scheduler_metrics_mixin.py +++ b/python/sglang/srt/observability/scheduler_metrics_mixin.py @@ -925,14 +925,14 @@ class SchedulerMetricsMixin: active_lora_ids = set() # For PP mode, check all running micro batches - if hasattr(self, "running_mbs") and self.running_mbs: + if self.server_args.pp_size > 1: for batch in self.running_mbs: if batch and hasattr(batch, "reqs"): for req in batch.reqs: if hasattr(req, "lora_id") and req.lora_id is not None: active_lora_ids.add(req.lora_id) # For normal mode, check running_batch - elif hasattr(self, "running_batch") and self.running_batch: + elif self.running_batch: if hasattr(self.running_batch, "reqs"): for req in self.running_batch.reqs: if hasattr(req, "lora_id") and req.lora_id is not None: