-
Notifications
You must be signed in to change notification settings - Fork 3.5k
2/n Simplify spawn plugins: Spawn immediately #10896
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
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…tor/spawn/simple-spawn
for more information, see https://pre-commit.ci
…tor/spawn/simple-spawn
I have addressed all major questions and reviews. Thanks for the input and positive response so far! |
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.
excellent! super exciting to see this simplification along with all of the followup opportunities this surfaced!
Looks great to me! I don't have permission to accept, but super happy to see this 💯 A big milestone for Accelerator stable version!! |
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.
Woohoo!
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.
Awesome work !
What does this PR do?
Fixes #10059 (step 4 & 5)
Moves the spawning of process right at the beginning of
Trianer.fit/validate/test/predict
.root_device
gets accessed in a hook that runs outside the spawned processes in TPU spawn. This today would cause the process to exit with a cryptic message.The core change of is that the spawning happens a level higher up in the trainer. Here is a simplified illustration using functions for before vs. after:
Before:
After:
Possible issues that this PR might fix or help fix (need to check):
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
I made sure I had fun coding 🙃
Part of #1 (it's a lie, this is just here to avoid noisy GitHub bot)
cc @Borda @justusschock @kaushikb11 @awaelchli @ninginthecloud