Skip to content

Commit

Permalink
bugfix: trainer.gpus, trainer.strategy, trainer.accelerator (#7621) (#…
Browse files Browse the repository at this point in the history
…7642)

* [TTS] bugfix for Tacotron2 tutorial due to PTL 2.0
* trainer.gpus -> trainer.devices
* fixed related tutorial bugs
---------
Signed-off-by: Xuesong Yang <[email protected]>
Co-authored-by: Xuesong Yang <[email protected]>
  • Loading branch information
github-actions[bot] authored and yaoyu-33 committed Oct 5, 2023
1 parent 19f32c5 commit 329bd3c
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/source/asr/speaker_diarization/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Prepare the msdd training dataset for both train and validation. After the train
.. code-block:: bash
python ./multiscale_diar_decoder.py --config-path='../conf/neural_diarizer' --config-name='msdd_5scl_15_05_50Povl_256x3x32x2.yaml' \
trainer.gpus=1 \
trainer.devices=1 \
trainer.max_epochs=20 \
model.base.diarizer.speaker_embeddings.model_path="titanet_large" \
model.train_ds.manifest_filepath="<train_manifest_path>" \
Expand Down
2 changes: 1 addition & 1 deletion examples/asr/experimental/k2/align_speech_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
python align_speech_parallel.py \
trainer.precision=16 \
trainer.gpus=2 \
trainer.devices=2 \
...
You may control the dataloader's config by setting the predict_ds:
Expand Down
2 changes: 1 addition & 1 deletion examples/asr/experimental/k2/speech_to_text_bpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
model.validation_ds.manifest_filepath=<path to val/test manifest> \
model.tokenizer.dir=<path to directory of tokenizer (not full path to the vocab file!)> \
model.tokenizer.type=<either `bpe` or `wpe`> \
trainer.gpus=-1 \
trainer.devices=-1 \
trainer.accelerator="ddp" \
trainer.max_epochs=100 \
model.optim.name="adamw" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
model.tokenizer.dir=<path to directory of tokenizer (not full path to the vocab file!)> \
model.tokenizer.model_path=<path to speech tokenizer model> \
model.tokenizer.type=<either bpe, wpe, or yttm> \
trainer.gpus=-1 \
trainer.devices=-1 \
trainer.accelerator="ddp" \
trainer.max_epochs=100 \
model.optim.name="adamw" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
model.data_dir=/home/user/multiatis \
model.validation_ds.prefix=dev \
model.test_ds.prefix=dev \
trainer.gpus=[0] \
trainer.devices=[0] \
+trainer.fast_dev_run=true \
exp_manager.exp_dir=checkpoints
Expand Down
5 changes: 3 additions & 2 deletions tutorials/tts/FastPitch_MixerTTS_Training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
" model.train_ds.dataloader_params.batch_size=24 \\\n",
" model.validation_ds.dataloader_params.batch_size=24 \\\n",
" exp_manager.exp_dir=./fastpitch_log_dir \\\n",
" model.n_speakers=1 trainer.devices=1 trainer.strategy=null \\\n",
" model.n_speakers=1 trainer.devices=1 trainer.strategy=\"ddp_find_unused_parameters_true\" \\\n",
")"
]
},
Expand Down Expand Up @@ -565,7 +565,8 @@
"model.train_ds.dataloader_params.num_workers=0 \\\n",
"model.validation_ds.dataloader_params.num_workers=0 \\\n",
"trainer.max_epochs=3 \\\n",
"trainer.strategy=null \\\n",
"trainer.accelerator=\"gpu\" \\\n",
"trainer.strategy=\"ddp_find_unused_parameters_true\" \\\n",
"trainer.check_val_every_n_epoch=1"
]
},
Expand Down
4 changes: 2 additions & 2 deletions tutorials/tts/Tacotron2_Training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@
" train_dataset=tests/data/asr/an4_train.json \\\n",
" validation_datasets=tests/data/asr/an4_val.json \\\n",
" trainer.max_epochs=3 \\\n",
" trainer.accelerator=null \\\n",
" trainer.accelerator='gpu' \\\n",
" trainer.check_val_every_n_epoch=1 \\\n",
" +trainer.gpus=1)"
" trainer.devices=1)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tts/Vits_Training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
" num_nodes: 1\n",
" devices: 2\n",
" accelerator: gpu\n",
" strategy: ddp\n",
" strategy: ddp_find_unused_parameters_true\n",
" precision: 32\n",
" max_epochs: -1\n",
" accumulate_grad_batches: 1\n",
Expand Down

0 comments on commit 329bd3c

Please sign in to comment.