Skip to content

Commit 2e02311

Browse files
authored
[Bugfix] Fix MultiprocessingGPUExecutor.check_health when world_size == 1 (#5254)
1 parent 89ec06c commit 2e02311

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vllm/executor/multiproc_gpu_executor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def _init_executor(self) -> None:
4646

4747
if world_size == 1:
4848
self.workers = []
49+
self.worker_monitor = None
4950
else:
5051
result_handler = ResultHandler()
5152
self.workers = [
@@ -127,7 +128,8 @@ def _run_workers(
127128

128129
def check_health(self) -> None:
129130
"""Raises an error if engine is unhealthy."""
130-
if not self.worker_monitor.is_alive():
131+
if self.worker_monitor is not None and not self.worker_monitor.is_alive(
132+
):
131133
raise RuntimeError("Worker processes are not running")
132134

133135
def _wait_for_tasks_completion(self, parallel_worker_tasks: Any) -> None:

0 commit comments

Comments
 (0)