W2v2 test require torch (#10665)

* Adds a @require_torch to a test that requires it

* Tokenizer too

* Style
This commit is contained in:
Lysandre Debut
2021-03-11 12:56:12 -05:00
committed by GitHub
parent 055ed78f52
commit 2adc8c926a
2 changed files with 4 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ import unittest
import numpy as np
from transformers import WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST, Wav2Vec2Config, Wav2Vec2FeatureExtractor
from transformers.testing_utils import slow
from transformers.testing_utils import require_torch, slow
from .test_sequence_feature_extraction_common import SequenceFeatureExtractionTestMixin
@@ -134,6 +134,7 @@ class Wav2Vec2FeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest
_check_zero_mean_unit_variance(input_values[2])
@slow
@require_torch
def test_pretrained_checkpoints_are_set_correctly(self):
# this test makes sure that models that are using
# group norm don't have their feature extractor return the