Skip to content

Commit

Permalink
fix long form generation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ylacombe committed Sep 12, 2024
1 parent ef4456b commit 1fd3d96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/models/whisper/test_modeling_whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2550,14 +2550,14 @@ def test_default_multilingual_transcription_long_form(self):
).input_features.to(torch_device)

# task defaults to transcribe
sequences = model.generate(input_features)
sequences = model.generate(input_features, return_timestamps=True)

transcription = processor.batch_decode(sequences)[0]

assert transcription == " मिर्ची में कितने विबिन्द प्रजातियां हैं? मिर्ची में कितने विबिन्द प्रजातियां हैं?"

# set task to translate
sequences = model.generate(input_features, task="translate")
sequences = model.generate(input_features, task="translate", return_timestamps=True)
transcription = processor.batch_decode(sequences)[0]

assert (
Expand Down

0 comments on commit 1fd3d96

Please sign in to comment.