From cb03fee32b5c191b3ac5a248e47cd58a66c75591 Mon Sep 17 00:00:00 2001 From: tomeras91 <57313761+tomeras91@users.noreply.github.com> Date: Sun, 3 May 2026 23:00:41 +0300 Subject: [PATCH] [Bugfix][Ray] Fix RayExecutorV2 actor name collision with DP > 1 (#40398) Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com> --- vllm/v1/engine/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vllm/v1/engine/utils.py b/vllm/v1/engine/utils.py index 7b0f00d14c..1f0b9bbb19 100644 --- a/vllm/v1/engine/utils.py +++ b/vllm/v1/engine/utils.py @@ -403,6 +403,11 @@ class CoreEngineActorManager: range(dp_size), local_dp_ranks, placement_groups ): dp_vllm_config = copy.deepcopy(vllm_config) + if dp_size > 1: + # Append the DP rank to instance_id so that per-engine + # identifiers (e.g. Ray actor names in RayExecutorV2) are + # unique across DP replicas. + dp_vllm_config.instance_id = f"{dp_vllm_config.instance_id}_dp{index}" dp_vllm_config.parallel_config.placement_group = pg local_client = index < local_engine_count