Conversation
Codecov Report
@@ Coverage Diff @@
## master #6208 +/- ##
=======================================
- Coverage 93% 88% -5%
=======================================
Files 212 212
Lines 13701 13697 -4
=======================================
- Hits 12741 12054 -687
- Misses 960 1643 +683 |
justusschock
approved these changes
Feb 27, 2021
Member
There was a problem hiding this comment.
I like it. Can we maybe raise a Warning for
# this always worked, still works, would use spawn method
Trainer(accelerator="ddp_cpu", num_processes=2)That this behavior might change in the future in favor of ddp and people should use
Trainer(accelerator="ddp_cpu_spawn", num_processes=2)instead?
Also in
# this now works too, uses spawn method
Trainer(accelerator="ddp_cpu", num_processes=2, plugins=[DDPSpawnPlugin(find_unused_parameters=True)])
# this now works, uses subprocess ddp
Trainer(accelerator="ddp_cpu", num_processes=2, plugins=[DDPPlugin(find_unused_parameters=True)])specifying the accelerator is not necessary when specifying the plugin and vice versa, right? So when I do Trainer(num_processes=2, plugins=[DDPPlugin()]) this should work if I don't specify any GPUs?
kaushikb11
reviewed
Feb 28, 2021
tchaton
reviewed
Mar 3, 2021
Collaborator
|
@awaelchli still in progress? |
Contributor
Author
|
I have some problems with RPC tests failing, when I am able to fix the issue, it will be ready for review. |
This reverts commit 8c27163.
for more information, see https://pre-commit.ci
Borda
approved these changes
Jul 1, 2021
6 tasks
Contributor
|
Removing "Ready to go" as tag as there are still some hangs :( |
kaushikb11
reviewed
Jul 2, 2021
kaushikb11
reviewed
Jul 2, 2021
kaushikb11
reviewed
Jul 2, 2021
kaushikb11
reviewed
Jul 2, 2021
Co-authored-by: Kaushik B <45285388+kaushikb11@users.noreply.github.com>
Co-authored-by: Kaushik B <45285388+kaushikb11@users.noreply.github.com>
kaushikb11
approved these changes
Jul 2, 2021
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Before 1.2, the setting
accelerator="ddp_cpu"would use the DDPSpawnAccelerator and today it is the DDPSpawnPlugin.However, after the refactor we can also support DDPPlugin (non-spawn) to be used with cpu.
This can be interpreted both as a bugfix or a added feature.
Fixes #6121
Related #7810
Introduces a new conftest fixture to all tests to address the following problem:
All ddp tests that init a process group have global side effects, since the process group is a global state in the pytorch library. It means the process group can carry over from one test to the other. This leads to problems when the world size changes or the distributed backend changes from e.g. gloo to nccl, leading to broken pipe and hangs. We address this by force killing the process group after every test. A different teardown approach will be explored in #8080.
Additionally, some test refactoring changes are necessary.
"Special tests" execute one new process per test, but this includes the parameterization. This is not good. We want that each parameterization is it's own new independent run. Otherwise we will just end up with subprocesses trying to launch new processes.
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?
No, not on this one.