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 15, 16:00 UTC
[core] do not send error across process (#16174)
Signed-off-by: youkaichao <youkaichao@gmail.com>
youkaichao committed
Apr 8, 2025 at 10:09 UTC
a865bc1ca6f794b0127e601058cee5100860875a
1 file changed
+7
-6
vllm/v1/executor/multiproc_executor.py
+7
-6
@@ -119,10 +119,9 @@ class MultiprocExecutor(Executor):
119
timeout=dequeue_timeout)
120
121
if status != WorkerProc.ResponseStatus.SUCCESS:
122
- if isinstance(result, Exception):
123
- raise result
124
- else:
125
- raise RuntimeError("Worker failed")
122
+ raise RuntimeError(
123
+ "Worker failed with error %s, please check the"
124
+ " stack trace above for the root cause", result)
125
126
responses[w.rank] = result
127
@@ -378,9 +377,11 @@ class WorkerProc:
377
# Notes have been introduced in python 3.11
378
if hasattr(e, "add_note"):
379
e.add_note(traceback.format_exc())
381
- self.worker_response_mq.enqueue(
382
- (WorkerProc.ResponseStatus.FAILURE, e))
380
logger.exception("WorkerProc hit an exception: %s", exc_info=e)
381
+ # exception might not be serializable, so we convert it to
382
+ # string, only for logging purpose.
383
+ self.worker_response_mq.enqueue(
384
+ (WorkerProc.ResponseStatus.FAILURE, str(e)))
385
continue
386
387
self.worker_response_mq.enqueue(