-
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
[Doc] Revamp ray core design patterns doc [6/n]: ray wait limits in-flight tasks #28469
Conversation
…tasks Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
@ray.remote | ||
class Actor: | ||
def heavy_compute(self, large_array): | ||
async def heavy_compute(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why async? Did the example not work previously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I chose to use async so tasks are finished in a different order than the submission order so using ray.wait()
makes more sense otherwise we could just ray.get()
one by one.
|
||
# __executing_task_start__ | ||
NUM_TASKS = 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to make the number of tasks infinite so that it better matches the issue description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the test code will be run by our CI. I couldn't figure out a good way to show infinite on the example but a small number for CI.
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao <[email protected]>
Signed-off-by: Jiajun Yao [email protected]
Why are these changes needed?
Related issue number
#27048
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.