Skip to content

Using DDPPlugin changes accelerator to ddp #7744

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

Closed
Rizhiy opened this issue May 27, 2021 · 5 comments · Fixed by #8483
Closed

Using DDPPlugin changes accelerator to ddp #7744

Rizhiy opened this issue May 27, 2021 · 5 comments · Fixed by #8483
Assignees
Labels
bug Something isn't working docs Documentation related help wanted Open to be worked on
Milestone

Comments

@Rizhiy
Copy link

Rizhiy commented May 27, 2021

🐛 Bug

If DDPPlugin is passed to pl.Trainer

Please reproduce using the BoringModel

https://colab.research.google.com/drive/1XsSQoQghHhIxA-9al9dnsjbBJOxzo1Ml?usp=sharing

To Reproduce

As can be seen in output of "Run Test", ddp is initialized even though dp is chosen as accelerator.

Expected behavior

Either ignore the plugin or raise an error about incompatability.

Environment

  • CUDA:
    • GPU:
      • Tesla T4
    • available: True
    • version: 10.1
  • Packages:
    • numpy: 1.19.5
    • pyTorch_debug: False
    • pyTorch_version: 1.8.1+cu101
    • pytorch-lightning: 1.3.3
    • tqdm: 4.41.1
  • System:
    • OS: Linux
    • architecture:
      • 64bit
    • processor: x86_64
    • python: 3.7.10
    • version: Proposal for help #1 SMP Tue Apr 20 19:55:43 PDT 2021

Additional context

@Rizhiy Rizhiy added bug Something isn't working help wanted Open to be worked on labels May 27, 2021
@kaushikb11 kaushikb11 self-assigned this May 27, 2021
@Rizhiy
Copy link
Author

Rizhiy commented May 27, 2021

As a consequence, DDPPlugin(find_unused_parameters=False) cannot be used with ddp_spawn.

@awaelchli
Copy link
Contributor

Directly related to #6090, we want to simplify how the accelerator and plugins are selected. This will also enable better checking of mismatching combinations.

@kaushikb11
Copy link
Contributor

@Rizhiy @awaelchli Picking up #6090 next week, it would simplify things.

@awaelchli
Copy link
Contributor

Sounds great!

@edenlightning edenlightning added this to the v1.3.x milestone Jul 1, 2021
@Borda Borda modified the milestones: v1.3.x, v1.4 Jul 6, 2021
@edenlightning edenlightning modified the milestones: v1.4, v1.3.x Jul 6, 2021
@Rizhiy
Copy link
Author

Rizhiy commented Jul 7, 2021

Decided to revisit this issue and found out that to use find_unused_parameters with ddp_spawn I have to use DDPSpawnPlugin instead of DDPPlugin.
Probably would be a good idea to add it to documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docs Documentation related help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants