Skip to content

Commit

Permalink
Remove empty create_and_test_config_common_properties tests (huggingf…
Browse files Browse the repository at this point in the history
…ace#31359)

Remove empty tests
  • Loading branch information
amyeroberts authored Jun 14, 2024
1 parent 3d0bd86 commit 2081223
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 68 deletions.
4 changes: 0 additions & 4 deletions tests/models/align/test_modeling_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,13 @@ def setUp(self):
)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="AlignVisionModel does not use inputs_embeds")
def test_inputs_embeds(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/bit/test_modeling_bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=BitConfig, has_text_modality=False)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="Bit does not output attentions")
def test_attention_outputs(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/convnext/test_modeling_convnext.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=ConvNextConfig, has_text_modality=False, hidden_size=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="ConvNext does not use inputs_embeds")
def test_inputs_embeds(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/convnextv2/test_modeling_convnextv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=ConvNextV2Config, has_text_modality=False, hidden_size=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="ConvNextV2 does not use inputs_embeds")
def test_inputs_embeds(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/cvt/test_modeling_cvt.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=CvtConfig, has_text_modality=False, hidden_size=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="Cvt does not output attentions")
def test_attention_outputs(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/dinat/test_modeling_dinat.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=DinatConfig, embed_dim=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

def test_model(self):
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_model(*config_and_inputs)
Expand Down
4 changes: 0 additions & 4 deletions tests/models/donut/test_modeling_donut_swin.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=DonutSwinConfig, embed_dim=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

def test_model(self):
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_model(*config_and_inputs)
Expand Down
4 changes: 0 additions & 4 deletions tests/models/efficientnet/test_modeling_efficientnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,13 @@ def setUp(self):
)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="EfficientNet does not use inputs_embeds")
def test_inputs_embeds(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/focalnet/test_modeling_focalnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=FocalNetConfig, embed_dim=37, has_text_modality=False)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

def test_model(self):
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_model(*config_and_inputs)
Expand Down
4 changes: 0 additions & 4 deletions tests/models/levit/test_modeling_levit.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=LevitConfig, has_text_modality=False, hidden_size=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="Levit does not use inputs_embeds")
def test_inputs_embeds(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/maskformer/test_modeling_maskformer_swin.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,13 @@ def test_multi_gpu_data_parallel_forward(self):
pass

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

def test_model(self):
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_model(*config_and_inputs)
Expand Down
4 changes: 0 additions & 4 deletions tests/models/regnet/test_modeling_regnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=RegNetConfig, has_text_modality=False)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="RegNet does not use inputs_embeds")
def test_inputs_embeds(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/resnet/test_modeling_resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=ResNetConfig, has_text_modality=False)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="ResNet does not use inputs_embeds")
def test_inputs_embeds(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/superpoint/test_modeling_superpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=SuperPointConfig, has_text_modality=False, hidden_size=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="SuperPointForKeypointDetection does not use inputs_embeds")
def test_inputs_embeds(self):
pass
Expand Down
4 changes: 0 additions & 4 deletions tests/models/swin/test_modeling_swin.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=SwinConfig, embed_dim=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

def test_model(self):
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_model(*config_and_inputs)
Expand Down
4 changes: 0 additions & 4 deletions tests/models/upernet/test_modeling_upernet.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=UperNetConfig, has_text_modality=False, hidden_size=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

def test_for_semantic_segmentation(self):
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_for_semantic_segmentation(*config_and_inputs)
Expand Down
4 changes: 0 additions & 4 deletions tests/models/vitmatte/test_modeling_vitmatte.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,13 @@ def setUp(self):
self.config_tester = ConfigTester(self, config_class=VitMatteConfig, has_text_modality=False, hidden_size=37)

def test_config(self):
self.create_and_test_config_common_properties()
self.config_tester.create_and_test_config_to_json_string()
self.config_tester.create_and_test_config_to_json_file()
self.config_tester.create_and_test_config_from_and_save_pretrained()
self.config_tester.create_and_test_config_with_num_labels()
self.config_tester.check_config_can_be_init_without_params()
self.config_tester.check_config_arguments_init()

def create_and_test_config_common_properties(self):
return

@unittest.skip(reason="VitMatte does not use inputs_embeds")
def test_inputs_embeds(self):
pass
Expand Down

0 comments on commit 2081223

Please sign in to comment.