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
d87f39e9
Unverified
Commit
d87f39e9
authored
Apr 24, 2024
by
DefTruth
Committed by
GitHub
Apr 23, 2024
Browse files
[Bugfix] Add init_cached_hf_modules to RayWorkerWrapper (#4286)
parent
d3c8180a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
vllm/executor/ray_gpu_executor.py
vllm/executor/ray_gpu_executor.py
+2
-0
vllm/worker/worker_base.py
vllm/worker/worker_base.py
+6
-1
No files found.
vllm/executor/ray_gpu_executor.py
View file @
d87f39e9
...
...
@@ -100,6 +100,7 @@ class RayGPUExecutor(ExecutorBase):
)(
RayWorkerWrapper
).
remote
(
worker_module_name
=
"vllm.worker.worker"
,
worker_class_name
=
"Worker"
,
trust_remote_code
=
self
.
model_config
.
trust_remote_code
,
)
worker_ip
=
ray
.
get
(
worker
.
get_node_ip
.
remote
())
...
...
@@ -110,6 +111,7 @@ class RayGPUExecutor(ExecutorBase):
self
.
driver_worker
=
RayWorkerWrapper
(
worker_module_name
=
"vllm.worker.worker"
,
worker_class_name
=
"Worker"
,
trust_remote_code
=
self
.
model_config
.
trust_remote_code
,
)
else
:
# Else, added to the list of workers.
...
...
vllm/worker/worker_base.py
View file @
d87f39e9
...
...
@@ -103,10 +103,15 @@ class WorkerWrapperBase:
def
__init__
(
self
,
worker_module_name
=
None
,
worker_class_name
=
None
)
->
None
:
worker_class_name
=
None
,
trust_remote_code
:
bool
=
False
)
->
None
:
self
.
worker_module_name
=
worker_module_name
self
.
worker_class_name
=
worker_class_name
self
.
worker
=
None
if
trust_remote_code
:
# note: lazy import to avoid importing torch before initializing
from
vllm.utils
import
init_cached_hf_modules
init_cached_hf_modules
()
@
staticmethod
def
update_environment_variables
(
envs
:
Dict
[
str
,
str
])
->
None
:
...
...
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