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

[Core] Support labels for ray.remote #48715

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jjyao
Copy link
Collaborator

@jjyao jjyao commented Nov 13, 2024

Why are these changes needed?

Allows users to set labels for actors and tasks (we already support node labels): ray.remote(_labels={"key1": "value1"}) We start with private option but it should be a generally useful thing to be public in the future.

For now it will be used by Data and get_local_ongoing_lineage_reconstruction_tasks() API.

Related issue number

Closes #48476

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: Jiajun Yao <jeromeyjj@gmail.com>
@jjyao jjyao added the go add ONLY when ready to merge, run all tests label Nov 13, 2024
@jjyao jjyao changed the title [Core] Support metadata for ray.remote [Core] Support labels for ray.remote Nov 13, 2024
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
@jjyao jjyao marked this pull request as ready for review November 15, 2024 05:48
@jjyao jjyao requested review from pcmoritz, raulchen and a team as code owners November 15, 2024 05:48
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Copy link
Contributor

@raulchen raulchen left a comment

Choose a reason for hiding this comment

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

LGTM except for a few small comments

python/ray/_raylet.pyx Outdated Show resolved Hide resolved
src/ray/core_worker/common.h Show resolved Hide resolved
assert {
lineage_reconstruction_tasks[0][0].name,
lineage_reconstruction_tasks[1][0].name,
} == {"task", "Actor.run"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a guarantee for the order?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No guarantee for the order.

Copy link
Contributor

Choose a reason for hiding this comment

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

then we should sort the results here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean in the test?

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core] Update get_local_ongoing_lineage_reconstruction_tasks to return task metadata
3 participants