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 17, 04:15 UTC
[Core] print error before deadlock (#3459)
youkaichao committed
Mar 18, 2024 at 21:06 UTC
6a9c583e73c75c8eab10a9c607cb096750b751a0
1 file changed
+11
-2
vllm/engine/ray_utils.py
+11
-2
@@ -33,8 +33,17 @@ try:
33
return getattr(self.worker, name)
34
35
def execute_method(self, method, *args, **kwargs):
36
- executor = getattr(self, method)
37
- return executor(*args, **kwargs)
36
+ try:
37
+ executor = getattr(self, method)
38
+ return executor(*args, **kwargs)
39
+ except Exception as e:
40
+ # exceptions in ray worker may cause deadlock
41
+ # see https://github.com/vllm-project/vllm/issues/3455
42
+ # print the error and inform the user to solve the error
43
+ msg = (f"Error executing method {method}. "
44
+ "This might cause deadlock in distributed execution.")
45
+ logger.exception(msg)
46
+ raise e
47
48
def get_node_ip(self) -> str:
49
return get_ip()