Some fixes regarding auto mappings and test class names (#19923)

* Add pegasus_x

* ViTMSN

* ESM

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2022-10-27 14:38:59 +02:00
committed by GitHub
parent bec78ba154
commit f1e42bc50e
3 changed files with 14 additions and 7 deletions

View File

@@ -40,7 +40,7 @@ if is_vision_available():
from transformers import ViTFeatureExtractor
class ViTMAEModelTester:
class ViTMSNModelTester:
def __init__(
self,
parent,
@@ -146,7 +146,7 @@ class ViTMAEModelTester:
@require_torch
class ViTMSNModelTest(ModelTesterMixin, unittest.TestCase):
"""
Here we also overwrite some of the tests of test_modeling_common.py, as ViTMAE does not use input_ids, inputs_embeds,
Here we also overwrite some of the tests of test_modeling_common.py, as ViTMSN does not use input_ids, inputs_embeds,
attention_mask and seq_length.
"""
@@ -158,13 +158,13 @@ class ViTMSNModelTest(ModelTesterMixin, unittest.TestCase):
test_head_masking = False
def setUp(self):
self.model_tester = ViTMAEModelTester(self)
self.model_tester = ViTMSNModelTester(self)
self.config_tester = ConfigTester(self, config_class=ViTMSNConfig, has_text_modality=False, hidden_size=37)
def test_config(self):
self.config_tester.run_common_tests()
@unittest.skip(reason="ViTMAE does not use inputs_embeds")
@unittest.skip(reason="ViTMSN does not use inputs_embeds")
def test_inputs_embeds(self):
pass