[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:
@@ -575,7 +575,9 @@ class CoreEngineActorManager:
|
|||||||
node_ip_keys = [
|
node_ip_keys = [
|
||||||
key
|
key
|
||||||
for key in node_resources
|
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, (
|
assert len(node_ip_keys) == 1, (
|
||||||
f"Zero or multiple node IP keys found in node resources: {node_ip_keys}"
|
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:
|
if len(placement_groups) == dp_size:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if len(placement_groups) == dp_size:
|
||||||
|
break
|
||||||
|
|
||||||
if len(placement_groups) < dp_size:
|
if len(placement_groups) < dp_size:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Not enough resources to allocate {dp_size} "
|
f"Not enough resources to allocate {dp_size} "
|
||||||
|
|||||||
Reference in New Issue
Block a user