Skip to content

Commit bf0ef8a

Browse files
committed
Ensure DP worker has VllmConfig set
Signed-off-by: Ming Yang <minos.future@gmail.com>
1 parent b55eb8c commit bf0ef8a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

vllm/v1/engine/core.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,14 @@ def __init__(
607607

608608
self._init_data_parallel(vllm_config)
609609

610-
super().__init__(
611-
vllm_config, executor_class, log_stats, executor_fail_callback
612-
)
610+
# Set vllm_config context before EngineCore initialization
611+
# so that models can access the config during __init__
612+
from vllm.config import set_current_vllm_config
613+
614+
with set_current_vllm_config(vllm_config):
615+
super().__init__(
616+
vllm_config, executor_class, log_stats, executor_fail_callback
617+
)
613618

614619
# Background Threads and Queues for IO. These enable us to
615620
# overlap ZMQ socket IO with GPU since they release the GIL,

0 commit comments

Comments
 (0)