A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 23:15 UTC
[Bugfix] Fix `MultiprocessingGPUExecutor.check_health` when world_size == 1 (#5254)
Junichi Sato committed
Jun 12, 2024 at 02:38 UTC
2e02311a1b33b4fc21179813c56b444f1be10d53
1 file changed
+3
-1
vllm/executor/multiproc_gpu_executor.py
+3
-1
@@ -46,6 +46,7 @@ class MultiprocessingGPUExecutor(DistributedGPUExecutor):
46
47
if world_size == 1:
48
self.workers = []
49
+ self.worker_monitor = None
50
else:
51
result_handler = ResultHandler()
52
self.workers = [
@@ -127,7 +128,8 @@ class MultiprocessingGPUExecutor(DistributedGPUExecutor):
128
129
def check_health(self) -> None:
130
"""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
+ ):
133
raise RuntimeError("Worker processes are not running")
134
135
def _wait_for_tasks_completion(self, parallel_worker_tasks: Any) -> None: