[Doc] Improve abnormal information string (#29655)

Signed-off-by: maang <maang_h@163.com>
This commit is contained in:
maang-h 2025-11-28 16:12:20 +08:00 committed by GitHub
parent 480598958e
commit cc0f2a0e19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -371,8 +371,7 @@ class CoreEngineActorManager:
) )
assert len(nodes) > 0, "No nodes with resources found in Ray cluster." assert len(nodes) > 0, "No nodes with resources found in Ray cluster."
assert dp_master_ip_key in nodes[0], ( assert dp_master_ip_key in nodes[0], (
"The DP master node (ip: %s) is missing or dead", f"The DP master node (ip: {dp_master_ip}) is missing or dead"
dp_master_ip,
) )
device_str = current_platform.ray_device_key device_str = current_platform.ray_device_key
n_node_devices: list[int] = [ n_node_devices: list[int] = [
@ -446,8 +445,7 @@ class CoreEngineActorManager:
if key != "node:__internal_head__" and key.startswith("node:") if key != "node:__internal_head__" and key.startswith("node:")
] ]
assert len(node_ip_keys) == 1, ( assert len(node_ip_keys) == 1, (
"Zero or multiple node IP keys found in node resources: %s", f"Zero or multiple node IP keys found in node resources: {node_ip_keys}"
node_ip_keys,
) )
node_ip_key = node_ip_keys[0] node_ip_key = node_ip_keys[0]
node_ip = node_ip_key.split(":")[1] node_ip = node_ip_key.split(":")[1]
@ -464,11 +462,9 @@ class CoreEngineActorManager:
if node_ip == dp_master_ip: if node_ip == dp_master_ip:
if dp_size_available < dp_size_local: if dp_size_available < dp_size_local:
raise ValueError( raise ValueError(
"Not enough resources to allocate %s DP ranks " f"Not enough resources to allocate {dp_size_local} DP ranks "
"on DP master node %s, possible to fit %s DP ranks", f"on DP master node {dp_master_ip}, possible to fit "
dp_size_local, f"{dp_size_available} DP ranks."
dp_master_ip,
dp_size_available,
) )
dp_size_to_allocate = dp_size_local dp_size_to_allocate = dp_size_local
elif pack_strategy == "strict": elif pack_strategy == "strict":