-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Feature] get or create logic for placement groups #20196
Comments
@rkooo567 any thought on this? |
A couple comments; One note is that #18524 will be just a hint, and collocation or spread is not guaranteed. This might be a difference from placement group which can guarantee collocation if you place an actor to the same bundle. About
Can you give me more context? Driver (caller) never needs to use |
Yep, for Ray Train best effort is okay. If we want strict scheduling placement groups is a viable solution (though maybe we would need the ability to add more bundles to a placement group).
Yeah, this is called within an actor. At a high level the flows are: Ray Train:
Ray Train as part of Ray Tune:
Note that the Ray Train workers will always be added to a placement group, but the creator of the placement group will depend on whether or not it is contained in a Ray Tune job. We need to check |
That makes sense! Thanks for the detail here... Here, isn't def get_or_create_pg():
current_placement_group = get_current_placement_group()
if current_placement_group:
assert ray.get_runtime_context().should_create_placement_group
return current_placement_group
# create ? |
Btw, I feel like |
cc @matthewdeng |
Ah isn't |
Yes. Are there cases where the parent doesn’t set that as True? |
Yeah the default value is now False: #17527 |
Hi, I'm a bot from the Ray team :) To help human contributors to focus on more relevant issues, I will automatically add the stale label to issues that have had no activity for more than 4 months. If there is no further activity in the 14 days, the issue will be closed!
You can always ask for help on our discussion forum or Ray's public slack channel. |
Hi again! The issue will be closed because there has been no more activity in the 14 days since the last message. Please feel free to reopen or open a new issue if you'd still like it to be addressed. Again, you can always ask for help on our discussion forum or Ray's public slack channel. Thanks again for opening the issue! |
Search before asking
Description
Currently, the logic to "get or create" a placement group feels a little complex and requires understanding of how
placement_group_capture_child_tasks
operates.Example:
Use case
For Ray Train, we want to be able to configure whether workers should be colocated or spread - this is done by creating a placement group with SPREAD or PACK strategy. If the caller of Train (e.g. Ray Tune) has already specified a placement group, it should take precedence and a new placement group should not be created.
Related issues
#18524 - for the described use-case, this solution would allow us to not need to create a placement group altogether. This would also be a preferred solution for elastic training!
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: