Skip to content

Conversation

ryanaoleary
Copy link
Contributor

Why are these changes needed?

This PR adds the bundle_label_selector option to Ray PlacementGroups, applying the label selectors on a per-bundle level to define label constraints for scheduling bundles on a node.

This PR passes the bundle_label_selector from the PlacementGroup options to the Raylet where the PlacementGroupSpec is built. Inside PlacementGroupSpec, each label selector is added to its corresponding Bundle message, and then added to the ResourceRequest in ComputeResources when the BundleSpec is constructed. This enables the cluster resource scheduler to check for required labels when calling IsFeasible and IsAvailable on a Node.

Related issue number

#51564

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
Signed-off-by: Ryan O'Leary <113500783+ryanaoleary@users.noreply.github.com>
@ryanaoleary ryanaoleary self-assigned this May 14, 2025
@ryanaoleary ryanaoleary requested review from MengjinYan and edoakes May 14, 2025 03:53
ryanaoleary and others added 3 commits May 14, 2025 04:10
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
@ryanaoleary ryanaoleary marked this pull request as ready for review May 14, 2025 23:33
@ryanaoleary ryanaoleary requested review from pcmoritz, raulchen and a team as code owners May 14, 2025 23:33
@hainesmichaelc hainesmichaelc added the community-contribution Contributed by the community label May 15, 2025
@masoudcharkhabi masoudcharkhabi added docs An issue or change related to documentation core Issues that should be addressed in Ray Core labels May 15, 2025
Copy link
Collaborator

@MengjinYan MengjinYan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MengjinYan
Copy link
Collaborator

@dayshah or @israbbani Do you mind take a brief look from c++'s perspective to see if there is any c++ particular comments? Thanks!

Copy link
Contributor

@dayshah dayshah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor cpp nit, otherwise lgtm from cpp perspective. +1 on @MengjinYan comments

ryanaoleary and others added 2 commits May 27, 2025 13:34
Co-authored-by: Dhyey Shah <dhyey2019@gmail.com>
Signed-off-by: Ryan O'Leary <113500783+ryanaoleary@users.noreply.github.com>
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
@ryanaoleary ryanaoleary requested a review from MengjinYan May 28, 2025 06:11
ryanaoleary and others added 2 commits May 27, 2025 23:17
Co-authored-by: Dhyey Shah <dhyey2019@gmail.com>
Signed-off-by: Ryan O'Leary <113500783+ryanaoleary@users.noreply.github.com>
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
@MengjinYan MengjinYan added the go add ONLY when ready to merge, run all tests label May 29, 2025
@edoakes edoakes merged commit ec24551 into ray-project:master May 30, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Contributed by the community core Issues that should be addressed in Ray Core docs An issue or change related to documentation go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants