Skip to content

Commit

Permalink
Merge branch 'tts_fastpitch_adapter_tutorial' of https://github.com/N…
Browse files Browse the repository at this point in the history
…VIDIA/NeMo into tts_fastpitch_adapter_tutorial
  • Loading branch information
hsiehjackson committed May 2, 2023
2 parents 4e75a6e + f402847 commit 1cb4727
Show file tree
Hide file tree
Showing 18 changed files with 872 additions and 166 deletions.
385 changes: 313 additions & 72 deletions examples/nlp/language_modeling/megatron_change_num_partitions.py

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions nemo/collections/asr/data/audio_to_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ def expand_sharded_filepaths(sharded_filepaths, shard_strategy: str, world_size:
sharded_filepaths = sharded_filepaths.replace(bkey, "}")

if isinstance(sharded_filepaths, str):
# Brace expand
sharded_filepaths = list(braceexpand.braceexpand(sharded_filepaths))
# Brace expand, set escape=False for Windows compatibility
sharded_filepaths = list(braceexpand.braceexpand(sharded_filepaths, escape=False))

# Expand store paths into WebDataset URLs
sharded_filepaths = [
Expand Down Expand Up @@ -1359,5 +1359,9 @@ def __iter__(self):
for dataset_idx in shuffled_order:
d = self.datasets[dataset_idx]
assert isinstance(d, IterableDataset), "ChainDataset only supports IterableDataset"
for x in d:
for idx, x in enumerate(d):
yield x
# in case d is an infinite dataset, we want to break the loop
# so that the other datasets get a chance to yield too
if idx >= len(d) - 1:
break
4 changes: 2 additions & 2 deletions nemo/collections/asr/data/audio_to_text_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def get_audio_to_text_char_dataset_from_config(
constructed dataset or None if dataset config is invalid or nothing to load
"""
if 'augmentor' in config:
augmentor = process_augmentations(config['augmentor'])
augmentor = process_augmentations(config['augmentor'], global_rank=global_rank, world_size=world_size)
else:
augmentor = None

Expand Down Expand Up @@ -609,7 +609,7 @@ def get_audio_to_text_bpe_dataset_from_config(
constructed dataset or None if dataset config is invalid or nothing to load
"""
if 'augmentor' in config:
augmentor = process_augmentations(config['augmentor'])
augmentor = process_augmentations(config['augmentor'], global_rank=global_rank, world_size=world_size)
else:
augmentor = None

Expand Down
1 change: 1 addition & 0 deletions nemo/collections/asr/parts/preprocessing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
GainPerturbation,
ImpulsePerturbation,
NoisePerturbation,
NoisePerturbationWithNormalization,
Perturbation,
RirAndNoisePerturbation,
ShiftPerturbation,
Expand Down
Loading

0 comments on commit 1cb4727

Please sign in to comment.