Unverified Commit 51dd14ac authored by Kebe's avatar Kebe Committed by GitHub
Browse files

[Bugfix][DP] Fix creating too many DP Placement Groups (#26880)


Signed-off-by: default avatarKebe <mail@kebe7jun.com>
Signed-off-by: default avatarRui Qiao <ruisearch42@gmail.com>
Co-authored-by: default avatarRui Qiao <ruisearch42@gmail.com>
parent dbfbf9f3
......@@ -497,6 +497,8 @@ class CoreEngineActorManager:
)
placement_groups.append(pg)
local_dp_ranks.append(i)
if len(placement_groups) == dp_size:
break
if len(placement_groups) < dp_size:
raise ValueError(
......@@ -506,6 +508,13 @@ class CoreEngineActorManager:
"Available resources: "
f"{available_resources}"
)
assert len(placement_groups) == dp_size, (
f"Created {len(placement_groups)} DP placement groups, expected {dp_size}"
)
assert len(local_dp_ranks) == dp_size, (
f"local_dp_ranks length {len(local_dp_ranks)} does not match "
f"expected {dp_size}"
)
return placement_groups, local_dp_ranks
@staticmethod
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment