Skip to content
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

[ddp] New ddp implementation doesn't work in notebooks / using scripts #2092

Closed
edenlightning opened this issue Jun 5, 2020 · 0 comments · Fixed by #2115
Closed

[ddp] New ddp implementation doesn't work in notebooks / using scripts #2092

edenlightning opened this issue Jun 5, 2020 · 0 comments · Fixed by #2115
Labels
bug Something isn't working help wanted Open to be worked on priority: 0 High priority task

Comments

@edenlightning
Copy link
Contributor

edenlightning commented Jun 5, 2020

The using .spawn() to spin off subprocesses ddp in had a few problems:

  • Everything needs to be picklable.
  • It doesn’t work well with num_workers on dataloaders because of spawn
  • fit(model) trains the model in a subprocess, so the original model is not updated.
    Those are not limitations of lightning, but of pytorch and python.

As a result, we removed .spawn and instead call the script under the hood.
This approach solves all problems above, but it assumes you can call your model like
python train.py ... and does not support other ways of calling the script.

We should decide how to support DDP on Jupyter notebooks.

@edenlightning edenlightning added help wanted Open to be worked on bug Something isn't working priority: 0 High priority task labels Jun 5, 2020
@edenlightning edenlightning changed the title [ddp] New ddp implementation doesn't work in Jupyter notebooks [ddp] New ddp implementation doesn't work in notebooks / using scripts Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to be worked on priority: 0 High priority task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant