Rename test_model_common_attributes -> test_model_get_set_embeddings (#31321)

* Rename to test_model_common_attributes
The method name is misleading - it is testing being able to get and set embeddings, not common attributes to all models

* Explicitly skip
This commit is contained in:
amyeroberts 2024-06-07 19:40:26 +01:00 committed by GitHub
parent c1be42f6f7
commit 25245ec26d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
108 changed files with 167 additions and 145 deletions

View File

@ -53,7 +53,7 @@ NOT_DEVICE_TESTS = {
"test_torch_save_load",
"test_initialization",
"test_forward_signature",
"test_model_common_attributes",
"test_model_get_set_embeddings",
"test_model_main_input_name",
"test_correct_missing_keys",
"test_tie_model_weights",

View File

@ -171,7 +171,7 @@ class AlignVisionModelTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="AlignVisionModel does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_forward_signature(self):
@ -489,7 +489,7 @@ class AlignModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="AlignModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `temperature` parameter initilization is different for ALIGN

View File

@ -153,7 +153,7 @@ class AltCLIPVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -459,7 +459,7 @@ class AltCLIPModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
pass
@unittest.skip(reason="CLIPModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for AltCLIP

View File

@ -185,7 +185,7 @@ class ASTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -212,7 +212,6 @@ class AutoformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
test_missing_keys = False
test_torchscript = False
test_inputs_embeds = False
test_model_common_attributes = False
def setUp(self):
self.model_tester = AutoformerModelTester(self)
@ -403,6 +402,10 @@ class AutoformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
def test_retain_grad_hidden_states_attentions(self):
super().test_retain_grad_hidden_states_attentions()
@unittest.skip(reason="Model does not have input embeddings")
def test_model_get_set_embeddings(self):
pass
def prepare_batch(filename="train-batch.pt"):
file = hf_hub_download(repo_id="hf-internal-testing/tourism-monthly-batch", filename=filename, repo_type="dataset")

View File

@ -809,7 +809,7 @@ class BarkFineModelTest(ModelTesterMixin, unittest.TestCase):
expected_arg_names = ["codebook_idx", "input_ids"]
self.assertListEqual(arg_names[:2], expected_arg_names)
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
# one embedding layer per codebook
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()

View File

@ -270,7 +270,7 @@ class BeitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_feed_forward_chunking(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -196,7 +196,7 @@ class BitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="Bit does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_model(self):

View File

@ -168,7 +168,7 @@ class BlipVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -462,7 +462,7 @@ class BlipModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="BlipModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for Blip
@ -867,7 +867,7 @@ class BlipVQAModelTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="BlipModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@ -901,7 +901,7 @@ class BlipTextRetrievalModelTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="BlipModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_forward_signature(self):
@ -1129,7 +1129,7 @@ class BlipTextImageModelTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="BlipModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_forward_signature(self):

View File

@ -162,7 +162,7 @@ class Blip2VisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -463,7 +463,7 @@ class Blip2ForConditionalGenerationDecoderOnlyTest(ModelTesterMixin, GenerationT
pass
@unittest.skip(reason="Blip2Model does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="There's no base Blip2Model")
@ -722,7 +722,7 @@ class Blip2ModelTest(ModelTesterMixin, PipelineTesterMixin, GenerationTesterMixi
pass
@unittest.skip(reason="Blip2Model does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="There's no base Blip2Model")

View File

@ -499,7 +499,7 @@ class BridgeTowerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC
)
@unittest.skip(reason="""Bridge Tower does not have input/output embeddings. So this test is not applicable.""")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="""Bridge Tower does not have input/output embeddings. Thus this test is not applicable.""")

View File

@ -506,7 +506,7 @@ class CanineModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip("CANINE does not have a get_input_embeddings() method.")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(

View File

@ -441,7 +441,7 @@ class ChineseCLIPVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -589,7 +589,7 @@ class ChineseCLIPModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC
pass
@unittest.skip(reason="ChineseCLIPModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for CHINESE_CLIP

View File

@ -177,7 +177,7 @@ class ClapAudioModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -533,7 +533,7 @@ class ClapModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="ClapModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for CLAP

View File

@ -191,7 +191,7 @@ class CLIPVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -506,7 +506,7 @@ class CLIPModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="CLIPModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for CLIP
@ -783,7 +783,7 @@ class CLIPForImageClassificationModelTest(ModelTesterMixin, PipelineTesterMixin,
pass
@unittest.skip(reason="CLIPForImageClassification does not support inputs_embeds")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="CLIPForImageClassification does not support gradient checkpointing yet")

View File

@ -169,7 +169,7 @@ class CLIPSegVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -490,7 +490,7 @@ class CLIPSegModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
pass
@unittest.skip(reason="CLIPSegModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(

View File

@ -489,7 +489,7 @@ class ClvpModelForConditionalGenerationTest(ModelTesterMixin, unittest.TestCase)
pass
@unittest.skip(reason="ClvpModelForConditionalGeneration does not have get_input_embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for Clvp

View File

@ -251,7 +251,7 @@ class ConditionalDetrModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline
pass
@unittest.skip(reason="Conditional DETR does not have a get_input_embeddings method")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="Conditional DETR is not a generative model")

View File

@ -202,7 +202,7 @@ class ConvNextModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
pass
@unittest.skip(reason="ConvNext does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="ConvNext does not use feedforward chunking")

View File

@ -210,7 +210,7 @@ class ConvNextV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
pass
@unittest.skip(reason="ConvNextV2 does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="ConvNextV2 does not use feedforward chunking")

View File

@ -185,7 +185,7 @@ class CvtModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="Cvt does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_model(self):

View File

@ -442,7 +442,7 @@ class Data2VecAudioModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes
# Data2VecAudio has no inputs_embeds
# and thus the `get_input_embeddings` fn
# is not implemented
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@is_pt_flax_cross_test

View File

@ -207,7 +207,7 @@ class Data2VecVisionModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te
def test_multi_gpu_data_parallel_forward(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -143,7 +143,6 @@ class DecisionTransformerModelTest(ModelTesterMixin, GenerationTesterMixin, Pipe
test_attention_outputs = False
test_hidden_states_output = False
test_inputs_embeds = False
test_model_common_attributes = False
test_gradient_checkpointing = False
test_torchscript = False
@ -184,6 +183,10 @@ class DecisionTransformerModelTest(ModelTesterMixin, GenerationTesterMixin, Pipe
self.assertListEqual(arg_names[: len(expected_arg_names)], expected_arg_names)
@unittest.skip(reason="Model does not have input embeddings")
def test_model_get_set_embeddings(self):
pass
@require_torch
class DecisionTransformerModelIntegrationTest(unittest.TestCase):

View File

@ -257,7 +257,7 @@ class DeformableDetrModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT
pass
@unittest.skip(reason="Deformable DETR does not have a get_input_embeddings method")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="Deformable DETR is not a generative model")

View File

@ -241,7 +241,7 @@ class DeiTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -178,7 +178,7 @@ class DepthAnythingModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes
pass
@unittest.skip(reason="Depth Anything with AutoBackbone does not have a base model and hence no input_embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="Depth Anything with AutoBackbone does not have a base model")

View File

@ -251,7 +251,7 @@ class DetrModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin
pass
@unittest.skip(reason="DETR does not have a get_input_embeddings method")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="DETR is not a generative model")

View File

@ -253,7 +253,7 @@ class DinatModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_feed_forward_chunking(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -258,7 +258,7 @@ class Dinov2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_training_gradient_checkpointing_use_reentrant_false(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -175,7 +175,7 @@ class DonutSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
# DonutSwin does not use inputs_embeds
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -183,7 +183,7 @@ class DPTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -217,7 +217,7 @@ class DPTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
)
@unittest.skip(reason="DPT with AutoBackbone does not have a base model and hence no input_embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="DPT with AutoBackbone does not have a base model")

View File

@ -198,7 +198,7 @@ class DPTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -162,7 +162,7 @@ class EfficientNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test
pass
@unittest.skip(reason="EfficientNet does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="EfficientNet does not use feedforward chunking")

View File

@ -183,7 +183,7 @@ class EncodecModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
pass
@unittest.skip("The EncodecModel is not transformers based, thus it does not have `inputs_embeds` logics")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip("The EncodecModel is not transformers based, thus it does not have the usual `attention` logic")

View File

@ -344,7 +344,7 @@ class FastSpeech2ConformerModelTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="FastSpeech2Conformer has no input embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(
@ -766,7 +766,7 @@ class FastSpeech2ConformerWithHifiGanTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="FastSpeech2Conformer has no input embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(

View File

@ -180,7 +180,7 @@ class FlavaImageModelTest(ModelTesterMixin, unittest.TestCase):
# FLAVA does not use inputs_embeds
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -619,7 +619,7 @@ class FlavaMultimodalModelTest(ModelTesterMixin, unittest.TestCase):
expected_arg_names = ["hidden_states"]
self.assertListEqual(arg_names[:1], expected_arg_names)
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
# No embedding in multimodal model
pass
@ -742,7 +742,7 @@ class FlavaImageCodebookTest(ModelTesterMixin, unittest.TestCase):
def test_attention_outputs(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
# No embedding in multimodal model
pass
@ -944,7 +944,7 @@ class FlavaModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
# FlavaModel does not have input/output embeddings
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for FLAVA

View File

@ -288,7 +288,7 @@ class FocalNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
def test_feed_forward_chunking(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes[:-1]:

View File

@ -193,8 +193,8 @@ class FSMTModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin
def test_config(self):
self.config_tester.run_common_tests()
# XXX: override test_model_common_attributes / different Embedding type
def test_model_common_attributes(self):
# XXX: override test_model_get_set_embeddings / different Embedding type
def test_model_get_set_embeddings(self):
config, inputs_dict = self.model_tester.prepare_config_and_inputs()
for model_class in self.all_model_classes:

View File

@ -142,7 +142,7 @@ class GitVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -173,7 +173,7 @@ class GLPNModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip("GLPN does not have get_input_embeddings method and get_output_embeddings methods")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_attention_outputs(self):

View File

@ -269,7 +269,7 @@ class GroundingDinoModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Tes
pass
@unittest.skip(reason="Grounding DINO does not have a get_input_embeddings method")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="Grounding DINO does not use token embeddings")

View File

@ -174,7 +174,7 @@ class GroupViTVisionModelTest(ModelTesterMixin, unittest.TestCase):
tf.random.set_seed(seed)
return super().test_pt_tf_model_equivalence()
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -573,7 +573,7 @@ class GroupViTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
pass
@unittest.skip(reason="GroupViTModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# overwritten from parent as this equivalent test needs a specific `seed` and hard to get a good one!

View File

@ -366,7 +366,7 @@ class HubertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
# Hubert has no inputs_embeds
# and thus the `get_input_embeddings` fn
# is not implemented
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_retain_grad_hidden_states_attentions(self):
@ -631,7 +631,7 @@ class HubertRobustModelTest(ModelTesterMixin, unittest.TestCase):
# Hubert has no inputs_embeds
# and thus the `get_input_embeddings` fn
# is not implemented
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_retain_grad_hidden_states_attentions(self):

View File

@ -334,7 +334,7 @@ class IBertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self.assertTrue(torch.all(torch.eq(position_ids, expected_positions)))
# Override
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -198,7 +198,6 @@ class InformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
test_missing_keys = False
test_torchscript = False
test_inputs_embeds = False
test_model_common_attributes = False
def setUp(self):
self.model_tester = InformerModelTester(self)
@ -468,6 +467,10 @@ class InformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
def test_retain_grad_hidden_states_attentions(self):
super().test_retain_grad_hidden_states_attentions()
@unittest.skip(reason="Model does not have input embeddings")
def test_model_get_set_embeddings(self):
pass
def prepare_batch(filename="train-batch.pt"):
file = hf_hub_download(repo_id="hf-internal-testing/tourism-monthly-batch", filename=filename, repo_type="dataset")

View File

@ -165,7 +165,7 @@ class InstructBlipVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -485,7 +485,7 @@ class InstructBlipForConditionalGenerationDecoderOnlyTest(ModelTesterMixin, Gene
pass
@unittest.skip(reason="InstructBlipModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="There's no base InstructBlipModel")

View File

@ -209,7 +209,7 @@ class LevitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="Levit does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="Levit does not output attentions")

View File

@ -225,7 +225,7 @@ class Mask2FormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC
pass
@unittest.skip(reason="Mask2Former does not have a get_input_embeddings method")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="Mask2Former is not a generative model")

View File

@ -251,7 +251,7 @@ class MaskFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
pass
@unittest.skip(reason="MaskFormer does not have a get_input_embeddings method")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="MaskFormer is not a generative model")

View File

@ -224,7 +224,7 @@ class MaskFormerSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te
def test_feed_forward_chunking(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -145,7 +145,7 @@ class MgpstrModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -167,7 +167,7 @@ class MobileNetV1ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC
pass
@unittest.skip(reason="MobileNetV1 does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="MobileNetV1 does not output attentions")

View File

@ -218,7 +218,7 @@ class MobileNetV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC
pass
@unittest.skip(reason="MobileNetV2 does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="MobileNetV2 does not output attentions")

View File

@ -211,7 +211,7 @@ class MobileViTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
pass
@unittest.skip(reason="MobileViT does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="MobileViT does not output attentions")

View File

@ -213,7 +213,7 @@ class MobileViTV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC
pass
@unittest.skip(reason="MobileViTV2 does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="MobileViTV2 does not output attentions")

View File

@ -256,7 +256,7 @@ class MusicgenDecoderTest(ModelTesterMixin, GenerationTesterMixin, PipelineTeste
model(**inputs)[0]
# override since we have embeddings / LM heads over multiple codebooks
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -1401,7 +1401,7 @@ class MusicgenTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin,
)
# override since we have embeddings / LM heads over multiple codebooks
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -259,7 +259,7 @@ class MusicgenMelodyDecoderTest(ModelTesterMixin, GenerationTesterMixin, unittes
model(**inputs)[0]
# override since we have embeddings / LM heads over multiple codebooks
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -1385,7 +1385,7 @@ class MusicgenMelodyTest(ModelTesterMixin, GenerationTesterMixin, PipelineTester
)
# override since we have embeddings / LM heads over multiple codebooks
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -293,7 +293,7 @@ class OneFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
pass
@unittest.skip(reason="OneFormer does not have a get_input_embeddings method")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="OneFormer is not a generative model")

View File

@ -162,7 +162,7 @@ class Owlv2VisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -465,7 +465,7 @@ class Owlv2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="Owlv2Model does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for OWLV2
@ -671,7 +671,7 @@ class Owlv2ForObjectDetectionTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="Owlv2Model does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="Test_initialization is tested in individual model tests")

View File

@ -160,7 +160,7 @@ class OwlViTVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -460,7 +460,7 @@ class OwlViTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="OwlViTModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for OWLVIT
@ -664,7 +664,7 @@ class OwlViTForObjectDetectionTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="OwlViTModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="Test_initialization is tested in individual model tests")

View File

@ -229,7 +229,6 @@ class PatchTSMixerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test
test_missing_keys = False
test_torchscript = False
test_inputs_embeds = False
test_model_common_attributes = False
test_resize_embeddings = True
test_resize_position_embeddings = False
@ -448,6 +447,10 @@ class PatchTSMixerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test
def test_retain_grad_hidden_states_attentions(self):
super().test_retain_grad_hidden_states_attentions()
@unittest.skip(reason="Model does not have input embeddings")
def test_model_get_set_embeddings(self):
pass
def prepare_batch(repo_id="ibm/patchtsmixer-etth1-test-data", file="pretrain_batch.pt"):
# TODO: Make repo public

View File

@ -165,7 +165,6 @@ class PatchTSTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
test_missing_keys = True
test_torchscript = False
test_inputs_embeds = False
test_model_common_attributes = False
test_resize_embeddings = True
test_resize_position_embeddings = False
@ -297,6 +296,10 @@ class PatchTSTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
def test_retain_grad_hidden_states_attentions(self):
super().test_retain_grad_hidden_states_attentions()
@unittest.skip(reason="Model does not have input embeddings")
def test_model_get_set_embeddings(self):
pass
def prepare_batch(repo_id="hf-internal-testing/etth1-hourly-batch", file="train-batch.pt"):
file = hf_hub_download(repo_id=repo_id, filename=file, repo_type="dataset")

View File

@ -377,7 +377,7 @@ class PerceiverModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
)
self.model_tester.create_and_check_for_image_classification_conv(*config_and_inputs)
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
for model_class in self.all_model_classes:
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_model_class(model_class)
model = model_class(config)

View File

@ -162,7 +162,7 @@ class Pix2StructVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -458,7 +458,7 @@ class Pix2StructModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
pass
@unittest.skip(reason="Pix2StructModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_forward_signature(self):

View File

@ -149,7 +149,7 @@ class PoolFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
pass
@unittest.skip("PoolFormer does not have get_input_embeddings method and get_output_embeddings methods")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_hidden_states_output(self):

View File

@ -183,7 +183,7 @@ class PvtModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip("Pvt does not have get_input_embeddings method and get_output_embeddings methods")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_initialization(self):

View File

@ -219,7 +219,7 @@ class PvtV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip("Pvt-V2 does not have get_input_embeddings method and get_output_embeddings methods")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="This architecture does not work with using reentrant.")

View File

@ -155,7 +155,7 @@ class RegNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="RegNet does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_model(self):

View File

@ -200,7 +200,7 @@ class ResNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="ResNet does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_model(self):

View File

@ -326,7 +326,7 @@ class SamModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -205,7 +205,7 @@ class SegformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
pass
@unittest.skip("SegFormer does not have get_input_embeddings method and get_output_embeddings methods")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_attention_outputs(self):

View File

@ -187,7 +187,7 @@ class SegGptModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -352,7 +352,7 @@ class SEWModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
# SEW has no inputs_embeds
# and thus the `get_input_embeddings` fn
# is not implemented
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip("No support for low_cpu_mem_usage=True.")

View File

@ -374,7 +374,7 @@ class SEWDModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
# SEW has no inputs_embeds
# and thus the `get_input_embeddings` fn
# is not implemented
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_retain_grad_hidden_states_attentions(self):

View File

@ -166,7 +166,7 @@ class SiglipVisionModelTest(ModelTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:
@ -469,8 +469,8 @@ class SiglipModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="SiglipModel does not have input/output embeddings")
# Copied from tests.models.clip.test_modeling_clip.CLIPModelTest.test_model_common_attributes
def test_model_common_attributes(self):
# Copied from tests.models.clip.test_modeling_clip.CLIPModelTest.test_model_get_set_embeddings
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="SiglipModel does not support training")
@ -627,7 +627,7 @@ class SiglipForImageClassificationModelTest(ModelTesterMixin, PipelineTesterMixi
pass
@unittest.skip(reason="SiglipForImageClassification does not support inputs_embeds")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="SiglipForImageClassification does not support gradient checkpointing yet")

View File

@ -217,7 +217,7 @@ class SpeechT5ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
pass
# this model has no input embeddings
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_retain_grad_hidden_states_attentions(self):
@ -1654,7 +1654,7 @@ class SpeechT5ForSpeechToSpeechTest(ModelTesterMixin, unittest.TestCase):
pass
# this model has no input embeddings
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# skipped because there is always dropout in SpeechT5SpeechDecoderPrenet
@ -1848,7 +1848,7 @@ class SpeechT5HifiGanTest(ModelTesterMixin, unittest.TestCase):
pass
# this model has no input embeddings
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# skip as this model doesn't support all arguments tested

View File

@ -143,7 +143,7 @@ class SuperPointModelTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="SuperPointForKeypointDetection does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="SuperPointForKeypointDetection does not use feedforward chunking")

View File

@ -166,7 +166,7 @@ class SwiftFormerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -289,7 +289,7 @@ class SwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_feed_forward_chunking(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -222,7 +222,7 @@ class Swin2SRModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
def test_training_gradient_checkpointing_use_reentrant_false(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -256,7 +256,7 @@ class Swinv2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -265,7 +265,7 @@ class TableTransformerModelTest(ModelTesterMixin, GenerationTesterMixin, Pipelin
pass
@unittest.skip(reason="Table Transformer does not have a get_input_embeddings method")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="Table Transformer is not a generative model")

View File

@ -187,7 +187,6 @@ class TimeSeriesTransformerModelTest(ModelTesterMixin, PipelineTesterMixin, unit
test_missing_keys = False
test_torchscript = False
test_inputs_embeds = False
test_model_common_attributes = False
def setUp(self):
self.model_tester = TimeSeriesTransformerModelTester(self)
@ -476,6 +475,10 @@ class TimeSeriesTransformerModelTest(ModelTesterMixin, PipelineTesterMixin, unit
def test_retain_grad_hidden_states_attentions(self):
super().test_retain_grad_hidden_states_attentions()
@unittest.skip(reason="Model does not have input embeddings")
def test_model_get_set_embeddings(self):
pass
def prepare_batch(filename="train-batch.pt"):
file = hf_hub_download(repo_id="hf-internal-testing/tourism-monthly-batch", filename=filename, repo_type="dataset")

View File

@ -192,7 +192,7 @@ class TimesformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestC
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -158,7 +158,7 @@ class TimmBackboneModelTest(ModelTesterMixin, BackboneTesterMixin, PipelineTeste
pass
@unittest.skip("TimmBackbone models doesn't have inputs_embeds")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip("TimmBackbone model cannot be created without specifying a backbone checkpoint")

View File

@ -191,7 +191,7 @@ class TVPModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="TVPModel does not have input/output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override as the `logit_scale` parameter initilization is different for TVP

View File

@ -369,7 +369,7 @@ class UniSpeechRobustModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.T
# UniSpeech has no inputs_embeds
# and thus the `get_input_embeddings` fn
# is not implemented
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_retain_grad_hidden_states_attentions(self):

View File

@ -419,7 +419,7 @@ class UniSpeechSatModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test
# UniSpeechSat has no inputs_embeds
# and thus the `get_input_embeddings` fn
# is not implemented
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_retain_grad_hidden_states_attentions(self):
@ -631,7 +631,7 @@ class UniSpeechSatRobustModelTest(ModelTesterMixin, unittest.TestCase):
# UniSpeechSat has no inputs_embeds
# and thus the `get_input_embeddings` fn
# is not implemented
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_retain_grad_hidden_states_attentions(self):

View File

@ -163,7 +163,7 @@ class UnivNetModelTest(ModelTesterMixin, unittest.TestCase):
pass
@unittest.skip(reason="UnivNetModel does not use input embeddings and thus has no get_input_embeddings method.")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="UnivNetModel does not support all arguments tested, such as output_hidden_states.")

View File

@ -184,7 +184,7 @@ class UperNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
pass
@unittest.skip(reason="UperNet does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
@unittest.skip(reason="UperNet does not have a base model")

View File

@ -220,7 +220,7 @@ class VideoMAEModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -226,7 +226,7 @@ class ViTModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -186,7 +186,7 @@ class ViTMAEModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -174,7 +174,7 @@ class ViTMSNModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -204,7 +204,7 @@ class VitDetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

View File

@ -185,7 +185,7 @@ class VitMatteModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
pass
@unittest.skip(reason="ViTMatte does not support input and output embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
def test_model(self):

View File

@ -265,7 +265,7 @@ class VitsModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
pass
@unittest.skip("VITS has no input embeddings")
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
pass
# override since the model is not deterministic, so we need to set the seed for each forward pass

View File

@ -192,7 +192,7 @@ class VivitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
def test_inputs_embeds(self):
pass
def test_model_common_attributes(self):
def test_model_get_set_embeddings(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
for model_class in self.all_model_classes:

Some files were not shown because too many files have changed in this diff Show More