Rename accelerator="ddp" to strategy="ddp" (#228)

This commit is contained in:
Nils Werner authored and GitHub committed 2021-12-16 19:39:07 +01:00
1 parent 7a33c0bdad
commit 8b62eef9d0
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -174,10 +174,10 @@ python run.py trainer.gpus=1
python run.py +trainer.tpu_cores=8
# train with DDP (Distributed Data Parallel) (4 GPUs)
python run.py trainer.gpus=4 +trainer.accelerator=ddp
python run.py trainer.gpus=4 +trainer.strategy=ddp
# train with DDP (Distributed Data Parallel) (8 GPUs, 2 nodes)
python run.py trainer.gpus=4 +trainer.num_nodes=2 +trainer.accelerator=ddp
python run.py trainer.gpus=4 +trainer.num_nodes=2 +trainer.strategy=ddp
```
</details>
@@ -915,7 +915,7 @@ The most common one is DDP, which spawns separate process for each GPU and avera
You can run DDP on mnist example with 4 GPUs like this:
```bash
python run.py trainer.gpus=4 +trainer.accelerator="ddp"
python run.py trainer.gpus=4 +trainer.strategy=ddp
```
⚠️ When using DDP you have to be careful how you write your models - learn more [here](https://pytorch-lightning.readthedocs.io/en/latest/advanced/multi_gpu.html).
+1 -1
View File
@@ -2,4 +2,4 @@ defaults:
- default.yaml
gpus: 4
accelerator: ddp
strategy: ddp