Use self.config_tester.run_common_tests() (#31431)
* First testing updating config tests * Use run_common_tests
This commit is contained in:
@@ -230,15 +230,15 @@ class DeformableDetrModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineT
|
||||
|
||||
def setUp(self):
|
||||
self.model_tester = DeformableDetrModelTester(self)
|
||||
self.config_tester = ConfigTester(self, config_class=DeformableDetrConfig, has_text_modality=False)
|
||||
self.config_tester = ConfigTester(
|
||||
self,
|
||||
config_class=DeformableDetrConfig,
|
||||
has_text_modality=False,
|
||||
common_properties=["num_channels", "d_model", "encoder_attention_heads", "decoder_attention_heads"],
|
||||
)
|
||||
|
||||
def test_config(self):
|
||||
# we don't test common_properties and arguments_init as these don't apply for Deformable DETR
|
||||
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.run_common_tests()
|
||||
|
||||
def test_deformable_detr_model(self):
|
||||
config_and_inputs = self.model_tester.prepare_config_and_inputs()
|
||||
|
||||
Reference in New Issue
Block a user