Skip to content

Conversation

larrylian
Copy link
Contributor

@larrylian larrylian commented May 17, 2023

Why are these changes needed?

  1. Add --labels param in ray start command-line to setting node labels
ray start --head --labels='{"gpu_type": "A100", "region": "us"}'
  1. Add a new field "Labels" to the ray.nodes() API to getting the labels of each node.
ray.nodes()[0]["Labels"] == {"gpu_type": "A100", "region": "us"}
  1. Add a basic test case
    python/ray/tests/test_node_labels.py
    Other exceptional scenarios and boundary scenarios testing will be added later by new PR.

Related issue number

Enhancing node affinity scheduling feature through node labels #34894

(P1)Finalize the command-line API(ray start) for setting node labels.

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 :(

@larrylian larrylian requested review from scv119 and jjyao May 17, 2023 12:35
@larrylian larrylian changed the title [Core][node labels 1/n]Add --labels param in ray start command to setting node labels [Core][Node Labels 1/n] Add --labels param in ray start command to setting node labels May 17, 2023
Copy link
Collaborator

@jjyao jjyao left a comment

Choose a reason for hiding this comment

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

Nice!!!

@@ -524,6 +524,13 @@ def debug(address):
default=False,
help="If True, the usage stats collection will be disabled.",
)
@click.option(
"--labels",
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe hidden=True, for now and we can make it public after we finish everything

@larrylian larrylian force-pushed the node_labels_1 branch 2 times, most recently from d135b72 to e88f744 Compare May 24, 2023 07:47
@jjyao
Copy link
Collaborator

jjyao commented May 25, 2023

@pcmoritz could you review the core API change?

@rkooo567 rkooo567 self-assigned this May 25, 2023
@ollie-iterators
Copy link

The linkcheck error has been fixed elsewhere in this commit: d0153a3

@larrylian larrylian force-pushed the node_labels_1 branch 2 times, most recently from 9ca7b4b to 1435d50 Compare May 29, 2023 06:16
…ting node labels

Signed-off-by: LarryLian <554538252@qq.com>
@jjyao jjyao merged commit 01af833 into ray-project:master Jun 1, 2023
scv119 pushed a commit to scv119/ray that referenced this pull request Jun 16, 2023
…ting node labels (ray-project#35433)

Enhancing node affinity scheduling feature through node labels ray-project#34894

Signed-off-by: LarryLian <554538252@qq.com>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
…ting node labels (ray-project#35433)

Enhancing node affinity scheduling feature through node labels ray-project#34894

Signed-off-by: LarryLian <554538252@qq.com>
Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants