Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
7a83b1ae
Unverified
Commit
7a83b1ae
authored
Nov 05, 2024
by
Gene Der Su
Committed by
GitHub
Nov 05, 2024
Browse files
[BugFix] Lazy import ray (#10021)
parent
ad233189
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
vllm/engine/multiprocessing/engine.py
vllm/engine/multiprocessing/engine.py
+11
-6
No files found.
vllm/engine/multiprocessing/engine.py
View file @
7a83b1ae
...
@@ -5,7 +5,6 @@ from typing import Iterator, List, Optional, Union
...
@@ -5,7 +5,6 @@ from typing import Iterator, List, Optional, Union
import
cloudpickle
import
cloudpickle
import
zmq
import
zmq
from
ray.exceptions
import
RayTaskError
from
vllm
import
AsyncEngineArgs
,
SamplingParams
from
vllm
import
AsyncEngineArgs
,
SamplingParams
# yapf conflicts with isort for this block
# yapf conflicts with isort for this block
...
@@ -306,11 +305,17 @@ class MQLLMEngine:
...
@@ -306,11 +305,17 @@ class MQLLMEngine:
def
_send_outputs
(
self
,
outputs
:
REQUEST_OUTPUTS_T
):
def
_send_outputs
(
self
,
outputs
:
REQUEST_OUTPUTS_T
):
"""Send List of RequestOutput to RPCClient."""
"""Send List of RequestOutput to RPCClient."""
if
outputs
:
if
outputs
:
# RayTaskError might not pickelable here. We need to unpack the
try
:
# underlying exception as the real exception in the output.
from
ray.exceptions
import
RayTaskError
if
(
isinstance
(
outputs
,
RPCError
)
and
isinstance
(
outputs
.
exception
,
RayTaskError
)):
# RayTaskError might not pickelable here. We need to unpack the
outputs
.
exception
=
outputs
.
exception
.
cause
# underlying exception as the real exception in the output.
if
(
isinstance
(
outputs
,
RPCError
)
and
isinstance
(
outputs
.
exception
,
RayTaskError
)):
outputs
.
exception
=
outputs
.
exception
.
cause
except
ImportError
:
pass
output_bytes
=
pickle
.
dumps
(
outputs
)
output_bytes
=
pickle
.
dumps
(
outputs
)
self
.
output_socket
.
send_multipart
((
output_bytes
,
),
copy
=
False
)
self
.
output_socket
.
send_multipart
((
output_bytes
,
),
copy
=
False
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment