[FeatureExtractorSavingUtils] Refactor PretrainedFeatureExtractor (#10594)
* save first version * finish refactor * finish refactor * correct naming * correct naming * shorter names * Update src/transformers/feature_extraction_common_utils.py Co-authored-by: Lysandre Debut <lysandre@huggingface.co> * change name * finish Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
This commit is contained in:
committed by
GitHub
parent
b6a28e9ac9
commit
9a06b6b11b
@@ -23,7 +23,7 @@ import numpy as np
|
||||
from transformers import WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST, Wav2Vec2Config, Wav2Vec2FeatureExtractor
|
||||
from transformers.testing_utils import slow
|
||||
|
||||
from .test_feature_extraction_common import FeatureExtractionMixin
|
||||
from .test_sequence_feature_extraction_common import SequenceFeatureExtractionTestMixin
|
||||
|
||||
|
||||
global_rng = random.Random()
|
||||
@@ -94,7 +94,7 @@ class Wav2Vec2FeatureExtractionTester(unittest.TestCase):
|
||||
return speech_inputs
|
||||
|
||||
|
||||
class Wav2Vec2FeatureExtractionTest(FeatureExtractionMixin, unittest.TestCase):
|
||||
class Wav2Vec2FeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest.TestCase):
|
||||
|
||||
feature_extraction_class = Wav2Vec2FeatureExtractor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user