[Bugfix] Skip non-positive scheduled token spans in omni stage runners (#5269)
Signed-off-by: cr-gao <gaochenrui@sjtu.edu.cn> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
f44649ffd0
commit
cc1939120f
5 files changed
+51
-4
No files matched your search
@@ -159,7 +159,8 @@ class GPUGenerationModelRunner(OmniGPUModelRunner, OmniConnectorModelRunnerMixin
|
||||
if scheduler_output.finished_req_ids and hasattr(self.model, "on_requests_finished"):
|
||||
self.model.on_requests_finished(scheduler_output.finished_req_ids)
|
||||
|
||||
if not scheduler_output.total_num_scheduled_tokens:
|
||||
# `<= 0`: upstream can schedule a negative span, which is truthy (#5196).
|
||||
if scheduler_output.total_num_scheduled_tokens <= 0:
|
||||
return self.attach_omni_connector_output(EMPTY_MODEL_RUNNER_OUTPUT)
|
||||
|
||||
if has_ec_transfer() and not get_ec_transfer().is_consumer:
|
||||
|
||||
Reference in new issue
Block a user