Pytorch-lightning: Support launching ddp job as module python -m ...

Created on 28 Sep 2020  路  6Comments  路  Source: PyTorchLightning/pytorch-lightning

馃殌 Feature

Motivation

Some users wish to launch their training program as a module with python -m some.module.py

Pitch

We should evalute whether this is possible for ddp and support this option when possible.
We need to strip the -m argument and append it to the command with which we launch the child processes.

Alternatives

Additional context

This feature was orginally reported as a bug: #3600

DDP enhancement good first issue help wanted

All 6 comments

torchelastic would be a good option here: https://pytorch.org/elastic/0.2.0/quickstart.html

Hey @awaelchli, I would like to take this

that's cool with me! give it a shot!

Hey @awaelchli , sorry for not being clear about this earlier, will this require gpus for testing!

will this require gpus for testing!

the standard ddp with gpus yes. But if you don't have gpus, you can probably implement the feature for the ddp_cpu backend first (this kind of simulates ddp on the cpu).

To add to the discussion: I'm able to use DDP backend when running my training program as a module, eg: python -m seg_lapa.train, so long as I use absolute imports. See #4243.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

awaelchli picture awaelchli  路  3Comments

srush picture srush  路  3Comments

iakremnev picture iakremnev  路  3Comments

edenlightning picture edenlightning  路  3Comments

mmsamiei picture mmsamiei  路  3Comments