-
Notifications
You must be signed in to change notification settings - Fork 17
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
Rearrange ray
initialization to avoid RuntimeWarning
#515
Conversation
conftest.py
Outdated
have_ray = False | ||
else: | ||
have_ray = True | ||
ray.init(num_cpus=1) # required to be here: see ray-project/ray#44087 |
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 num_cpus=1
? I don't see anything about that at ray-project/ray#44087
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 the location of the ray.init
call that is "required to be here". The constraint on the number of cpus is so that it will play nicely with tests run in parallel.
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.
Updated comment in an attempt to clarify this.
Rearrange
ray
initialization to avoidRuntimeWarning
resulting from initialization ofray
afterjax
has been imported, as described in #513.