ray icon indicating copy to clipboard operation
ray copied to clipboard

[core] [1/2] Topology aware scheduling public API

Open aaronscalene opened this issue 6 months ago • 3 comments

Description

This is directly related to this REP. This commit introduces topology aware scheduling for the public API, providing users a public-facing API to use as opposed to the code added in #61442. For more information, please read the REP and the private facing API.

Considerations

API Validation

Currently, our API will only support one layer of topology aware scheduling. Furthermore, we currently only support at max one node level placement strategy and label aware placement strategy. We also only support STRICT_PACK currently on label aware placement strategies. Thus, our _validate_topology_strategy will mainly focus on ensuring that users are only allowed to pass in these inputs.

Node Level Placement Strategy

Whenever topology_strategy is defined, we will not allow users to specify strategy and instead only be able to specify strategy through the label ray.io/node-id. We enforce this through our validation as well. However, currently, this ray.io/node-id is just extracted from the user input and piped as the strategy input anyways into the code. In the future, we will have to consider a more robust way to pipe this input through once we decided to support multiple levels as well as multiple labels to be scheduled on per level.

Label Locality Private Functionality

Currently, we support bundle_label_selectors to be specified with GB200 / 300 to implicitly call into the same topology aware code. Within this, we are deprecating this functionality in support of this PR, which supports a more general version. Although we considered that this will deprecate parts of the API we support, we decided to continue with this more general version since we believe that having one path is more intuitive for future users. Furthermore, since our initial feature is just an alpha feature, we are comfortable with removing it.

Testing

New unit tests added, and existing unit tests are translated over from GB200 / 300 support.

The new dashboard UI looks like below: image

The new ray list placement-groups --detail:

-   placement_group_id: 94cbd842f8deeee2167e746f1cc101000000
    name: ''
    creator_job_id: '01000000'
    state: CREATED
    ...
    topology_strategy:
    -   entries:
            ray.io/gpu-domain: STRICT_PACK
    topology_assignments:
    -   assignments:
            ray.io/gpu-domain: rack-1
...

aaronscalene avatar May 18 '26 23:05 aaronscalene

[!WARNING] You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

gemini-code-assist avatar May 18 '26 23:05 gemini-code-assist

Can you also update the documentation at placement-group.rst

Will be done in a following PR

aaronscalene avatar May 23 '26 06:05 aaronscalene

@aaronscalene could you also attach a screenshot of what the updated dashboard with topology aware scheduling looks like + the cli output as well?

Sparks0219 avatar May 30 '26 07:05 Sparks0219

@aaronscalene Let's go! Can't wait to get this in!

Yicheng-Lu-llll avatar Jun 25 '26 23:06 Yicheng-Lu-llll

Thank you @MengjinYan @Sparks0219 and @Yicheng-Lu-llll ❤️ 😄

aaronlinear avatar Jun 26 '26 07:06 aaronlinear