Type-fix: make execute_model output type optional (#12020)

This commit is contained in:
Keyun Tong
2025-01-15 01:44:56 -08:00
committed by GitHub
parent cbe94391eb
commit ad388d25a8
2 changed files with 2 additions and 1 deletions

View File

@@ -200,7 +200,7 @@ class Worker:
def execute_model(
self,
scheduler_output: "SchedulerOutput",
) -> ModelRunnerOutput:
) -> Optional[ModelRunnerOutput]:
output = self.model_runner.execute_model(scheduler_output)
return output if self.rank == 0 else None