-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Clean up Ray processes after cluster util exits #3278
Conversation
Test PASSed. |
Test PASSed. |
Test PASSed. |
Test PASSed. |
assert not any(n.any_processes_alive() for n in [node, node2]) | ||
|
||
|
||
def test_shutdown(): |
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.
What is this intended to test? It seems redundant with the above test. Also, it doesn't hit the atexit
code path right? Because the Python interpreter is not exiting.
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.
It's to test that the shutdown
endpoint works as expected.
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.
Ok, I see. It's not testing the atexit
stuff though, right?
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.
No; it's just an additional test piggy-backing on this approval..
If you want to test this functionality, I think you need to do something like ray.utils.run_string_as_driver(
"""
import ...
g = Cluster(initialize_head=False)
node = g.add_node()
node2 = g.add_node()
"""
)
# Then in python, check that the raylets and plasma stores and such are gone. |
Adds
atexit
hook to Cluster instantiation.Closes #3277.