Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/nlp/dialogue/dialogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def main(cfg: DictConfig) -> None:
try:
strategy = NLPDDPStrategy(no_ddp_communication_hook=True, find_unused_parameters=True,)
except (ImportError, ModuleNotFoundError):
strategy = None
strategy = 'auto'

trainer = pl.Trainer(**cfg.trainer, strategy=strategy)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def main(cfg: DictConfig) -> None:
try:
strategy = NLPDDPStrategy(find_unused_parameters=True)
except (ImportError, ModuleNotFoundError):
strategy = None
strategy = 'auto'

trainer = pl.Trainer(strategy=strategy, **cfg.trainer)
exp_manager(trainer, cfg.get("exp_manager", None))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def main(cfg: DictConfig) -> None:
try:
strategy = NLPDDPStrategy(find_unused_parameters=True)
except (ImportError, ModuleNotFoundError):
strategy = None
strategy = 'auto'

trainer = pl.Trainer(strategy=strategy, **cfg.trainer)
exp_manager(trainer, cfg.get("exp_manager", None))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/asr/ASR_with_Subword_Tokenization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@
"trainer = pl.Trainer(amp_level='O1', precision=16)\r\n",
"\r\n",
"# Trainer with a distributed backend:\r\n",
"trainer = pl.Trainer(devices=2, num_nodes=2, accelerator='gpu', strategy='dp')\r\n",
"trainer = pl.Trainer(devices=2, num_nodes=2, accelerator='gpu', strategy='auto')\r\n",
"\r\n",
"# Of course, you can combine these flags as well.\r\n",
"```\r\n",
Expand Down Expand Up @@ -1443,4 +1443,4 @@
]
}
]
}
}
2 changes: 1 addition & 1 deletion tutorials/asr/Speech_Commands.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@
"\n",
"```python\n",
"# Trainer with a distributed backend:\n",
"trainer = Trainer(devices=2, num_nodes=2, accelerator='gpu', strategy='dp')\n",
"trainer = Trainer(devices=2, num_nodes=2, accelerator='gpu', strategy='auto')\n",
"\n",
"# Mixed precision:\n",
"trainer = Trainer(amp_level='O1', precision=16)\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/asr/Voice_Activity_Detection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@
"\n",
"```python\n",
"# Trainer with a distributed backend:\n",
"trainer = Trainer(devices=2, num_nodes=2, accelerator='gpu', strategy='dp')\n",
"trainer = Trainer(devices=2, num_nodes=2, accelerator='gpu', strategy='auto')\n",
"\n",
"# Mixed precision:\n",
"trainer = Trainer(amp_level='O1', precision=16)\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/nlp/Question_Answering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
"config.trainer.precision = 16\n",
"config.trainer.devices = [0] # 0 for CPU, or list of the GPUs to use [0] this tutorial does not support multiple GPUs. If needed please use NeMo/examples/nlp/question_answering/question_answering.py\n",
"config.trainer.accelerator = \"gpu\"\n",
"config.trainer.strategy=\"dp\""
"config.trainer.strategy=\"auto\""
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@
"We can dramatically improve the time taken to train this model by using Multi GPU training along with Mixed Precision.\n",
"\n",
"### Trainer with a distributed backend:\n",
"<pre><code>trainer = Trainer(devices=2, num_nodes=2, accelerator='gpu', strategy='dp')\n",
"<pre><code>trainer = Trainer(devices=2, num_nodes=2, accelerator='gpu', strategy='auto')\n",
"</code></pre>\n",
"\n",
"### Mixed precision:\n",
Expand Down