Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Autoscaler][Placement Group] Skip placed bundle when requesting resource #48924

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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