-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Align ddp and ddp-spawn strategies in setting up the environment #11073
Conversation
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
for more information, see https://pre-commit.ci
Hey @awaelchli. What is the status on this PR ? |
…' into refactor/spawn/setup-environment
for more information, see https://pre-commit.ci
The status is that I'm currently working on this and once #11163 is merged this will pretty much be ready. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
This pull request is going to be closed. Please feel free to reopen it create a new from the actual master. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
This pull request is going to be closed. Please feel free to reopen it create a new from the actual master. |
3779488
to
048339d
Compare
Co-authored-by: Kushashwa Ravi Shrimali <[email protected]>
@awaelchli mind checking the conflicts... 🦦 |
This reverts commit 9bfd40b.
🎉 |
🥳 |
What does this PR do?
Aligns the regular ddp strategy and the ddp spawn strategy in setting up the environment (through the method
setup_environement
which is called in the Trainer._run).Before:
DDP: Setup environment in
setup_environment
method/hook.DDPSpawn: At spawn time, in worker_setup function (slightly earlier than
setup_environment
method/hookNow:
Both DDP and DDPSpawn set the same variables in
setup_environment
method.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 🙃
cc @Borda @justusschock @awaelchli @rohitgr7 @kaushikb11 @akihironitta