mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-15 13:45:28 +08:00
Type-fix: make execute_model output type optional (#12020)
This commit is contained in:
parent
cbe94391eb
commit
ad388d25a8
@ -70,6 +70,7 @@ class UniprocExecutor(Executor):
|
||||
scheduler_output,
|
||||
) -> ModelRunnerOutput:
|
||||
output = self.worker.execute_model(scheduler_output)
|
||||
assert output is not None
|
||||
return output
|
||||
|
||||
def profile(self, is_start: bool = True):
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user