[Bugfix] Fix Ray placement group allocation with grouped nodes (#43998)

Signed-off-by: <conway.zhu@cohere.com>
Signed-off-by: root <conway.zhu@cohere.com>
This commit is contained in:
czhu-cohere
2026-05-29 12:51:05 -06:00
committed by GitHub
parent d07ad0693b
commit 8b9deeec4b
+6 -1
View File
@@ -575,7 +575,9 @@ class CoreEngineActorManager:
node_ip_keys = [
key
for key in node_resources
if key != "node:__internal_head__" and key.startswith("node:")
if key != "node:__internal_head__"
and key.startswith("node:")
and "_group_" not in key
]
assert len(node_ip_keys) == 1, (
f"Zero or multiple node IP keys found in node resources: {node_ip_keys}"
@@ -654,6 +656,9 @@ class CoreEngineActorManager:
if len(placement_groups) == dp_size:
break
if len(placement_groups) == dp_size:
break
if len(placement_groups) < dp_size:
raise ValueError(
f"Not enough resources to allocate {dp_size} "