Skip to content

[RLlib] Add tags option to actor manager #31803

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

Merged
merged 9 commits into from
Feb 2, 2023

Conversation

avnishn
Copy link
Member

@avnishn avnishn commented Jan 20, 2023

Signed-off-by: Avnish avnishnarayan@gmail.com

Add named tags for actor manager async requests.

that way async requests can be grouped and requested together.

Why are these changes needed?

Related issue number

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 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: Avnish <avnishnarayan@gmail.com>
Signed-off-by: Avnish <avnishnarayan@gmail.com>
Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

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

some nit picking pure programming comments

Signed-off-by: Avnish <avnishnarayan@gmail.com>
Signed-off-by: Avnish <avnishnarayan@gmail.com>
@@ -599,6 +605,7 @@ def foreach_actor(
def foreach_actor_async(
self,
func: Union[Callable[[Any], Any], List[Callable[[Any], Any]]],
tag: str = "default",
Copy link
Member

Choose a reason for hiding this comment

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

so thinking about this a bit more, it would be the best if we can attach multiple tags to an async all, like basically this parameter should be tags:

for sync alls, tags would be ()
for async call users, they can attached multiple tags for a single call, like ("rollout_worker", "sync_weight")
for async fetch result, we can also specify a single, or list of tags. for example, ("eval", "sample") will fetch all the sample() calls on eval workers.

I understand this is back & forth a few times, not sure if you are interested in making the changes.
if not, we can merge and unblock. you for now, and I can make these updates later today.

Copy link
Member Author

Choose a reason for hiding this comment

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

actually can I add a todo here and we punt on this?

Copy link
Member Author

Choose a reason for hiding this comment

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

We need this pr to implement the async trainer runner and I am falling behind atm

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added a todo as a comment for now

Signed-off-by: Avnish <avnishnarayan@gmail.com>
Signed-off-by: Avnish <avnishnarayan@gmail.com>
@gjoliver gjoliver merged commit a53907c into ray-project:master Feb 2, 2023
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
Signed-off-by: Avnish <avnishnarayan@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.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.

2 participants