[Past CI] 🔥 Leave Past CI failures in the past 🔥 (#20861)

* torch.jit._state

* Fix past CI

* Fix for perceiver

* Fix REALM

* Fix for Bloom

* Fix for SwinMode

* Fix for TrajectoryTransformerModel

* Fix for test_wav2vec2_with_lm

* make style

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2022-12-27 18:37:25 +01:00
committed by GitHub
parent e35bc46af6
commit 5fa0b17c3d
11 changed files with 53 additions and 6 deletions

View File

@@ -70,6 +70,9 @@ if is_torch_available():
_compute_mask_indices,
_sample_negative_indices,
)
from transformers.pytorch_utils import is_torch_less_than_1_9
else:
is_torch_less_than_1_9 = True
if is_torchaudio_available():
@@ -1640,6 +1643,10 @@ class Wav2Vec2ModelIntegrationTest(unittest.TestCase):
@require_pyctcdecode
@require_torchaudio
@unittest.skipIf(
is_torch_less_than_1_9,
reason="`torchaudio.functional.resample` needs torchaudio >= 0.9 which requires torch >= 0.9",
)
def test_wav2vec2_with_lm(self):
ds = load_dataset("common_voice", "es", split="test", streaming=True)
sample = next(iter(ds))
@@ -1664,6 +1671,10 @@ class Wav2Vec2ModelIntegrationTest(unittest.TestCase):
@require_pyctcdecode
@require_torchaudio
@unittest.skipIf(
is_torch_less_than_1_9,
reason="`torchaudio.functional.resample` needs torchaudio >= 0.9 which requires torch >= 0.9",
)
def test_wav2vec2_with_lm_pool(self):
ds = load_dataset("common_voice", "es", split="test", streaming=True)
sample = next(iter(ds))