Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
20812237
Unverified
Commit
20812237
authored
Jun 14, 2024
by
amyeroberts
Committed by
GitHub
Jun 14, 2024
Browse files
Remove empty create_and_test_config_common_properties tests (#31359)
Remove empty tests
parent
3d0bd869
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
0 additions
and
68 deletions
+0
-68
tests/models/align/test_modeling_align.py
tests/models/align/test_modeling_align.py
+0
-4
tests/models/bit/test_modeling_bit.py
tests/models/bit/test_modeling_bit.py
+0
-4
tests/models/convnext/test_modeling_convnext.py
tests/models/convnext/test_modeling_convnext.py
+0
-4
tests/models/convnextv2/test_modeling_convnextv2.py
tests/models/convnextv2/test_modeling_convnextv2.py
+0
-4
tests/models/cvt/test_modeling_cvt.py
tests/models/cvt/test_modeling_cvt.py
+0
-4
tests/models/dinat/test_modeling_dinat.py
tests/models/dinat/test_modeling_dinat.py
+0
-4
tests/models/donut/test_modeling_donut_swin.py
tests/models/donut/test_modeling_donut_swin.py
+0
-4
tests/models/efficientnet/test_modeling_efficientnet.py
tests/models/efficientnet/test_modeling_efficientnet.py
+0
-4
tests/models/focalnet/test_modeling_focalnet.py
tests/models/focalnet/test_modeling_focalnet.py
+0
-4
tests/models/levit/test_modeling_levit.py
tests/models/levit/test_modeling_levit.py
+0
-4
tests/models/maskformer/test_modeling_maskformer_swin.py
tests/models/maskformer/test_modeling_maskformer_swin.py
+0
-4
tests/models/regnet/test_modeling_regnet.py
tests/models/regnet/test_modeling_regnet.py
+0
-4
tests/models/resnet/test_modeling_resnet.py
tests/models/resnet/test_modeling_resnet.py
+0
-4
tests/models/superpoint/test_modeling_superpoint.py
tests/models/superpoint/test_modeling_superpoint.py
+0
-4
tests/models/swin/test_modeling_swin.py
tests/models/swin/test_modeling_swin.py
+0
-4
tests/models/upernet/test_modeling_upernet.py
tests/models/upernet/test_modeling_upernet.py
+0
-4
tests/models/vitmatte/test_modeling_vitmatte.py
tests/models/vitmatte/test_modeling_vitmatte.py
+0
-4
No files found.
tests/models/align/test_modeling_align.py
View file @
20812237
...
@@ -151,7 +151,6 @@ class AlignVisionModelTest(ModelTesterMixin, unittest.TestCase):
...
@@ -151,7 +151,6 @@ class AlignVisionModelTest(ModelTesterMixin, unittest.TestCase):
)
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -159,9 +158,6 @@ class AlignVisionModelTest(ModelTesterMixin, unittest.TestCase):
...
@@ -159,9 +158,6 @@ class AlignVisionModelTest(ModelTesterMixin, unittest.TestCase):
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
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"
)
@
unittest
.
skip
(
reason
=
"AlignVisionModel does not use inputs_embeds"
)
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
...
...
tests/models/bit/test_modeling_bit.py
View file @
20812237
...
@@ -176,7 +176,6 @@ class BitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -176,7 +176,6 @@ class BitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
BitConfig
,
has_text_modality
=
False
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
BitConfig
,
has_text_modality
=
False
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -184,9 +183,6 @@ class BitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -184,9 +183,6 @@ class BitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
self
.
config_tester
.
check_config_arguments_init
()
def
create_and_test_config_common_properties
(
self
):
return
@
unittest
.
skip
(
reason
=
"Bit does not output attentions"
)
@
unittest
.
skip
(
reason
=
"Bit does not output attentions"
)
def
test_attention_outputs
(
self
):
def
test_attention_outputs
(
self
):
pass
pass
...
...
tests/models/convnext/test_modeling_convnext.py
View file @
20812237
...
@@ -186,7 +186,6 @@ class ConvNextModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
...
@@ -186,7 +186,6 @@ class ConvNextModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
ConvNextConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
ConvNextConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -194,9 +193,6 @@ class ConvNextModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
...
@@ -194,9 +193,6 @@ class ConvNextModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
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"
)
@
unittest
.
skip
(
reason
=
"ConvNext does not use inputs_embeds"
)
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
...
...
tests/models/convnextv2/test_modeling_convnextv2.py
View file @
20812237
...
@@ -194,7 +194,6 @@ class ConvNextV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
...
@@ -194,7 +194,6 @@ class ConvNextV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
ConvNextV2Config
,
has_text_modality
=
False
,
hidden_size
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
ConvNextV2Config
,
has_text_modality
=
False
,
hidden_size
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -202,9 +201,6 @@ class ConvNextV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
...
@@ -202,9 +201,6 @@ class ConvNextV2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
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"
)
@
unittest
.
skip
(
reason
=
"ConvNextV2 does not use inputs_embeds"
)
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
...
...
tests/models/cvt/test_modeling_cvt.py
View file @
20812237
...
@@ -165,7 +165,6 @@ class CvtModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -165,7 +165,6 @@ class CvtModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
CvtConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
CvtConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -173,9 +172,6 @@ class CvtModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -173,9 +172,6 @@ class CvtModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
self
.
config_tester
.
check_config_arguments_init
()
def
create_and_test_config_common_properties
(
self
):
return
@
unittest
.
skip
(
reason
=
"Cvt does not output attentions"
)
@
unittest
.
skip
(
reason
=
"Cvt does not output attentions"
)
def
test_attention_outputs
(
self
):
def
test_attention_outputs
(
self
):
pass
pass
...
...
tests/models/dinat/test_modeling_dinat.py
View file @
20812237
...
@@ -222,7 +222,6 @@ class DinatModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -222,7 +222,6 @@ class DinatModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
DinatConfig
,
embed_dim
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
DinatConfig
,
embed_dim
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -230,9 +229,6 @@ class DinatModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -230,9 +229,6 @@ class DinatModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
self
.
config_tester
.
check_config_arguments_init
()
def
create_and_test_config_common_properties
(
self
):
return
def
test_model
(
self
):
def
test_model
(
self
):
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
...
...
tests/models/donut/test_modeling_donut_swin.py
View file @
20812237
...
@@ -156,7 +156,6 @@ class DonutSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
...
@@ -156,7 +156,6 @@ class DonutSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
DonutSwinConfig
,
embed_dim
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
DonutSwinConfig
,
embed_dim
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -164,9 +163,6 @@ class DonutSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
...
@@ -164,9 +163,6 @@ class DonutSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCas
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
self
.
config_tester
.
check_config_arguments_init
()
def
create_and_test_config_common_properties
(
self
):
return
def
test_model
(
self
):
def
test_model
(
self
):
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
...
...
tests/models/efficientnet/test_modeling_efficientnet.py
View file @
20812237
...
@@ -146,7 +146,6 @@ class EfficientNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test
...
@@ -146,7 +146,6 @@ class EfficientNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test
)
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -154,9 +153,6 @@ class EfficientNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test
...
@@ -154,9 +153,6 @@ class EfficientNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Test
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
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"
)
@
unittest
.
skip
(
reason
=
"EfficientNet does not use inputs_embeds"
)
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
...
...
tests/models/focalnet/test_modeling_focalnet.py
View file @
20812237
...
@@ -253,7 +253,6 @@ class FocalNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
...
@@ -253,7 +253,6 @@ class FocalNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
FocalNetConfig
,
embed_dim
=
37
,
has_text_modality
=
False
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
FocalNetConfig
,
embed_dim
=
37
,
has_text_modality
=
False
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -261,9 +260,6 @@ class FocalNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
...
@@ -261,9 +260,6 @@ class FocalNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
self
.
config_tester
.
check_config_arguments_init
()
def
create_and_test_config_common_properties
(
self
):
return
def
test_model
(
self
):
def
test_model
(
self
):
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
...
...
tests/models/levit/test_modeling_levit.py
View file @
20812237
...
@@ -193,7 +193,6 @@ class LevitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -193,7 +193,6 @@ class LevitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
LevitConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
LevitConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -201,9 +200,6 @@ class LevitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -201,9 +200,6 @@ class LevitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
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"
)
@
unittest
.
skip
(
reason
=
"Levit does not use inputs_embeds"
)
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
...
...
tests/models/maskformer/test_modeling_maskformer_swin.py
View file @
20812237
...
@@ -197,7 +197,6 @@ class MaskFormerSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te
...
@@ -197,7 +197,6 @@ class MaskFormerSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te
pass
pass
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -205,9 +204,6 @@ class MaskFormerSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te
...
@@ -205,9 +204,6 @@ class MaskFormerSwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.Te
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
self
.
config_tester
.
check_config_arguments_init
()
def
create_and_test_config_common_properties
(
self
):
return
def
test_model
(
self
):
def
test_model
(
self
):
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
...
...
tests/models/regnet/test_modeling_regnet.py
View file @
20812237
...
@@ -139,7 +139,6 @@ class RegNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -139,7 +139,6 @@ class RegNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
RegNetConfig
,
has_text_modality
=
False
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
RegNetConfig
,
has_text_modality
=
False
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -147,9 +146,6 @@ class RegNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -147,9 +146,6 @@ class RegNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
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"
)
@
unittest
.
skip
(
reason
=
"RegNet does not use inputs_embeds"
)
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
...
...
tests/models/resnet/test_modeling_resnet.py
View file @
20812237
...
@@ -184,7 +184,6 @@ class ResNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -184,7 +184,6 @@ class ResNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
ResNetConfig
,
has_text_modality
=
False
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
ResNetConfig
,
has_text_modality
=
False
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -192,9 +191,6 @@ class ResNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -192,9 +191,6 @@ class ResNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
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"
)
@
unittest
.
skip
(
reason
=
"ResNet does not use inputs_embeds"
)
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
...
...
tests/models/superpoint/test_modeling_superpoint.py
View file @
20812237
...
@@ -127,7 +127,6 @@ class SuperPointModelTest(ModelTesterMixin, unittest.TestCase):
...
@@ -127,7 +127,6 @@ class SuperPointModelTest(ModelTesterMixin, unittest.TestCase):
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
SuperPointConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
SuperPointConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -135,9 +134,6 @@ class SuperPointModelTest(ModelTesterMixin, unittest.TestCase):
...
@@ -135,9 +134,6 @@ class SuperPointModelTest(ModelTesterMixin, unittest.TestCase):
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
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"
)
@
unittest
.
skip
(
reason
=
"SuperPointForKeypointDetection does not use inputs_embeds"
)
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
...
...
tests/models/swin/test_modeling_swin.py
View file @
20812237
...
@@ -246,7 +246,6 @@ class SwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -246,7 +246,6 @@ class SwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
SwinConfig
,
embed_dim
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
SwinConfig
,
embed_dim
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -254,9 +253,6 @@ class SwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -254,9 +253,6 @@ class SwinModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
self
.
config_tester
.
check_config_arguments_init
()
def
create_and_test_config_common_properties
(
self
):
return
def
test_model
(
self
):
def
test_model
(
self
):
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
self
.
model_tester
.
create_and_check_model
(
*
config_and_inputs
)
...
...
tests/models/upernet/test_modeling_upernet.py
View file @
20812237
...
@@ -164,7 +164,6 @@ class UperNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
...
@@ -164,7 +164,6 @@ class UperNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
UperNetConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
UperNetConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -172,9 +171,6 @@ class UperNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
...
@@ -172,9 +171,6 @@ class UperNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase)
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
self
.
config_tester
.
check_config_arguments_init
()
def
create_and_test_config_common_properties
(
self
):
return
def
test_for_semantic_segmentation
(
self
):
def
test_for_semantic_segmentation
(
self
):
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
config_and_inputs
=
self
.
model_tester
.
prepare_config_and_inputs
()
self
.
model_tester
.
create_and_check_for_semantic_segmentation
(
*
config_and_inputs
)
self
.
model_tester
.
create_and_check_for_semantic_segmentation
(
*
config_and_inputs
)
...
...
tests/models/vitmatte/test_modeling_vitmatte.py
View file @
20812237
...
@@ -149,7 +149,6 @@ class VitMatteModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
...
@@ -149,7 +149,6 @@ class VitMatteModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
VitMatteConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
self
.
config_tester
=
ConfigTester
(
self
,
config_class
=
VitMatteConfig
,
has_text_modality
=
False
,
hidden_size
=
37
)
def
test_config
(
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_string
()
self
.
config_tester
.
create_and_test_config_to_json_file
()
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_from_and_save_pretrained
()
...
@@ -157,9 +156,6 @@ class VitMatteModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
...
@@ -157,9 +156,6 @@ class VitMatteModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_can_be_init_without_params
()
self
.
config_tester
.
check_config_arguments_init
()
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"
)
@
unittest
.
skip
(
reason
=
"VitMatte does not use inputs_embeds"
)
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment