From 1fd3d960afca9d01f0550b0cdbab77b354c22c2b Mon Sep 17 00:00:00 2001 From: Yoach Lacombe Date: Thu, 12 Sep 2024 17:18:40 +0200 Subject: [PATCH] fix long form generation tests --- tests/models/whisper/test_modeling_whisper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/models/whisper/test_modeling_whisper.py b/tests/models/whisper/test_modeling_whisper.py index d934825bf55bd6..c8ef338f1bcc8b 100644 --- a/tests/models/whisper/test_modeling_whisper.py +++ b/tests/models/whisper/test_modeling_whisper.py @@ -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 (