-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Simplify running tests in a subprocess #34213
Conversation
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.
Looks super complicated, thanks for diving!
Just missing some doc for me 🤗
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Okay, on my side I don't really see how this can be "hacked" now, sys.executable
is supposed to be safe, we could also just put python
here no?
On some docker environment we use, |
* check * check * check * check * add docstring --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
* check * check * check * check * add docstring --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
* check * check * check * check * add docstring --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
What does this PR do?
In order to make
running (some individual) tests in a subprocess
work with GPU (cuda), if we usemultiprocessing
, we have to usespawn
, but this uses pickle and has some limitations that make the necessary changes to the test methods quite big.This PR tries to use the
subprocess
module to implement a simpler way to run (some individual) tests in a subprocess.