Skip to content

Commit

Permalink
skip placed bundle when request resource
Browse files Browse the repository at this point in the history
Signed-off-by: Mimi Liao <mimiliao2000@gmail.com>
  • Loading branch information
mimiliaogo committed Dec 9, 2024
1 parent 2b03018 commit 5de1e9b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/ray/autoscaler/_private/resource_demand_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,14 @@ def placement_groups_to_resource_demands(
"""
resource_demand_vector = []
unconverted = []
shapes = []
for placement_group in pending_placement_groups:
shapes = [dict(bundle.unit_resources) for bundle in placement_group.bundles]
# Skip **placed** bundle (which has node id associated with it).
for bundle in placement_group.bundles:
if bundle.node_id:
continue
shapes.append(dict(bundle.unit_resources))

if (
placement_group.strategy == PlacementStrategy.PACK
or placement_group.strategy == PlacementStrategy.SPREAD
Expand Down

0 comments on commit 5de1e9b

Please sign in to comment.