Lift running_batch / running_mbs access — direct + PP-explicit (#25439)
This commit is contained in:
@@ -925,14 +925,14 @@ class SchedulerMetricsMixin:
|
|||||||
active_lora_ids = set()
|
active_lora_ids = set()
|
||||||
|
|
||||||
# For PP mode, check all running micro batches
|
# 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:
|
for batch in self.running_mbs:
|
||||||
if batch and hasattr(batch, "reqs"):
|
if batch and hasattr(batch, "reqs"):
|
||||||
for req in batch.reqs:
|
for req in batch.reqs:
|
||||||
if hasattr(req, "lora_id") and req.lora_id is not None:
|
if hasattr(req, "lora_id") and req.lora_id is not None:
|
||||||
active_lora_ids.add(req.lora_id)
|
active_lora_ids.add(req.lora_id)
|
||||||
# For normal mode, check running_batch
|
# 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"):
|
if hasattr(self.running_batch, "reqs"):
|
||||||
for req in self.running_batch.reqs:
|
for req in self.running_batch.reqs:
|
||||||
if hasattr(req, "lora_id") and req.lora_id is not None:
|
if hasattr(req, "lora_id") and req.lora_id is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user