Try to avoid/reduce some remaining CI job failures (#37202)

* try

* try

* Update tests/pipelines/test_pipelines_video_classification.py

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
This commit is contained in:
Yih-Dar
2025-04-02 14:39:57 +02:00
committed by GitHub
parent 6f5dc9c82e
commit adfc91cd46
3 changed files with 18 additions and 7 deletions

View File

@@ -39,6 +39,9 @@ if is_librosa_available():
class AudioUtilsFunctionTester(unittest.TestCase):
# will be set in `def _load_datasamples`
_dataset = None
def test_hertz_to_mel(self):
self.assertEqual(hertz_to_mel(0.0), 0.0)
self.assertAlmostEqual(hertz_to_mel(100), 150.48910241)
@@ -274,8 +277,9 @@ class AudioUtilsFunctionTester(unittest.TestCase):
def _load_datasamples(self, num_samples):
from datasets import load_dataset
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
speech_samples = ds.sort("id").select(range(num_samples))[:num_samples]["audio"]
if self._dataset is None:
self._dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
speech_samples = self._dataset.sort("id").select(range(num_samples))[:num_samples]["audio"]
return [x["array"] for x in speech_samples]
def test_spectrogram_impulse(self):