Skip to content

Commit 8dac920

Browse files
authored
Fix codec e2e tests (#15607)
Signed-off-by: Ryan <rlangman@nvidia.com>
1 parent e967011 commit 8dac920

9 files changed

Lines changed: 9 additions & 9 deletions

tests/e2e_nightly/test_model_support_mel_codec_22khz_fullband_medium.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_model_training_step():
6969
"audio_lens": torch.tensor([num_samples], device=d),
7070
}
7171

72-
audio, audio_len, audio_gen, commit_loss, codes = model._process_batch(batch)
72+
audio, audio_len, audio_gen, commit_loss, codes, *_ = model._process_batch(batch)
7373

7474
generator_losses = []
7575
loss_mel_l1, loss_mel_l2 = model.mel_loss_fn(

tests/e2e_nightly/test_model_support_nvidia__audio_codec_22khz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_model_training_step():
6868
"audio_lens": torch.tensor([num_samples], device=d),
6969
}
7070

71-
audio, audio_len, audio_gen, commit_loss, codes = model._process_batch(batch)
71+
audio, audio_len, audio_gen, commit_loss, codes, *_ = model._process_batch(batch)
7272

7373
generator_losses = []
7474
loss_mel_l1, loss_mel_l2 = model.mel_loss_fn(

tests/e2e_nightly/test_model_support_nvidia__audio_codec_44khz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_model_training_step():
7373
}
7474

7575
# Forward pass through encoder -> VQ -> decoder (same as training_step).
76-
audio, audio_len, audio_gen, commit_loss, codes = model._process_batch(batch)
76+
audio, audio_len, audio_gen, commit_loss, codes, *_ = model._process_batch(batch)
7777

7878
generator_losses = []
7979

tests/e2e_nightly/test_model_support_nvidia__low_frame_rate_speech_codec_22khz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_model_training_step():
7676
}
7777

7878
# Run the shared forward pass used by training_step.
79-
audio, audio_len, audio_gen, commit_loss, codes = model._process_batch(batch)
79+
audio, audio_len, audio_gen, commit_loss, codes, *_ = model._process_batch(batch)
8080

8181
# Compute the mel reconstruction loss (l1 + l2) — same calls as training_step.
8282
loss_mel_l1, loss_mel_l2 = model.mel_loss_fn(

tests/e2e_nightly/test_model_support_nvidia__mel_codec_22khz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_model_training_step():
7171
}
7272

7373
# _process_batch runs encoder -> (optional) vector quantizer -> decoder.
74-
audio, audio_len, audio_gen, commit_loss, codes = model._process_batch(batch)
74+
audio, audio_len, audio_gen, commit_loss, codes, *_ = model._process_batch(batch)
7575

7676
# Compute the L1 mel loss, which is always enabled (mel_loss_l1_scale > 0
7777
# by default) and is the primary reconstruction objective.

tests/e2e_nightly/test_model_support_nvidia__mel_codec_44khz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_model_training_step():
7272
}
7373

7474
# _process_batch runs encoder -> (optional) vector quantizer -> decoder.
75-
audio, audio_len, audio_gen, commit_loss, codes = model._process_batch(batch)
75+
audio, audio_len, audio_gen, commit_loss, codes, *_ = model._process_batch(batch)
7676

7777
# Compute the L1 mel loss, which is always enabled (mel_loss_l1_scale > 0
7878
# by default) and is the primary reconstruction objective.

tests/e2e_nightly/test_model_support_nvidia__nemo_nano_codec_22khz_0_6kbps_12_5fps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_model_training_step():
6666
audio_len = torch.tensor([num_samples], dtype=torch.long, device=d)
6767
batch = {"audio": audio, "audio_lens": audio_len}
6868

69-
audio_ref, audio_ref_len, audio_gen, commit_loss, _ = model._process_batch(batch)
69+
audio_ref, audio_ref_len, audio_gen, commit_loss, *_ = model._process_batch(batch)
7070

7171
loss_mel_l1, loss_mel_l2 = model.mel_loss_fn(
7272
audio_real=audio_ref.float(),

tests/e2e_nightly/test_model_support_nvidia__nemo_nano_codec_22khz_1_78kbps_12_5fps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_model_training_step():
7272
# _process_batch runs encoder → (optional) quantizer → decoder and returns
7373
# the (padded) reference audio, its lengths, the generated audio, the
7474
# commit loss from the quantizer, and the encoded representation.
75-
audio_ref, audio_ref_len, audio_gen, commit_loss, _ = model._process_batch(batch)
75+
audio_ref, audio_ref_len, audio_gen, commit_loss, *_ = model._process_batch(batch)
7676

7777
# Compute the mel reconstruction losses (the primary generator losses).
7878
# mel_loss_fn returns (loss_l1, loss_l2); both are scalar tensors.

tests/e2e_nightly/test_model_support_nvidia__nemo_nano_codec_22khz_1_89kbps_21_5fps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_model_training_step():
6868
"audio_lens": torch.tensor([num_samples], dtype=torch.long, device=d),
6969
}
7070

71-
audio, audio_len, audio_gen, commit_loss, codes = model._process_batch(batch)
71+
audio, audio_len, audio_gen, commit_loss, codes, *_ = model._process_batch(batch)
7272

7373
# Only compute mel reconstruction losses (skip discriminator).
7474
loss_mel_l1, loss_mel_l2 = model.mel_loss_fn(

0 commit comments

Comments
 (0)