From a0d9373196eff9b811eb807244cb59fce732d004 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 14 Nov 2023 10:10:40 +0100 Subject: [PATCH 1/4] skip 4 tests --- tests/models/mobilebert/test_modeling_mobilebert.py | 4 ++++ .../speech_to_text_2/test_modeling_speech_to_text_2.py | 5 +++++ tests/models/transfo_xl/test_modeling_transfo_xl.py | 3 +++ tests/models/xglm/test_modeling_xglm.py | 3 +++ 4 files changed, 15 insertions(+) diff --git a/tests/models/mobilebert/test_modeling_mobilebert.py b/tests/models/mobilebert/test_modeling_mobilebert.py index e4ebca4b6e5..5c25608a66d 100644 --- a/tests/models/mobilebert/test_modeling_mobilebert.py +++ b/tests/models/mobilebert/test_modeling_mobilebert.py @@ -302,6 +302,10 @@ def _prepare_for_class(self, inputs_dict, model_class, return_labels=False): def test_resize_tokens_embeddings(self): super().test_resize_tokens_embeddings() + @unnittest.skip("This test is currently broken because of safetensors.") + def test_tf_from_pt_safetensors(self) + pass + def setUp(self): self.model_tester = MobileBertModelTester(self) self.config_tester = ConfigTester(self, config_class=MobileBertConfig, hidden_size=37) diff --git a/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py b/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py index cbb449c6e7a..f0a6a925be2 100644 --- a/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py +++ b/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py @@ -196,6 +196,11 @@ def setUp( def test_inputs_embeds(self): pass + + @unnittest.skip("This test is currently broken because of safetensors.") + def test_tf_from_pt_safetensors(self) + pass + # speech2text2 has no base model def test_save_load_fast_init_from_base(self): pass diff --git a/tests/models/transfo_xl/test_modeling_transfo_xl.py b/tests/models/transfo_xl/test_modeling_transfo_xl.py index 63afd438d97..0d34d6a0525 100644 --- a/tests/models/transfo_xl/test_modeling_transfo_xl.py +++ b/tests/models/transfo_xl/test_modeling_transfo_xl.py @@ -490,6 +490,9 @@ def _mock_init_weights(self, module): def test_left_padding_compatibility(self): pass + @unnittest.skip("This test is currently broken because of safetensors.") + def test_tf_from_pt_safetensors(self) + pass @require_torch class TransfoXLModelLanguageGenerationTest(unittest.TestCase): diff --git a/tests/models/xglm/test_modeling_xglm.py b/tests/models/xglm/test_modeling_xglm.py index 235d9e19001..f3d2e229915 100644 --- a/tests/models/xglm/test_modeling_xglm.py +++ b/tests/models/xglm/test_modeling_xglm.py @@ -357,6 +357,9 @@ def test_model_from_pretrained(self): def test_model_parallelism(self): super().test_model_parallelism() + @unnittest.skip("This test is currently broken because of safetensors.") + def test_tf_from_pt_safetensors(self) + pass @require_torch class XGLMModelLanguageGenerationTest(unittest.TestCase): From 72a1414db8bc3dc2bade94831b1a2043900987de Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 14 Nov 2023 10:16:10 +0100 Subject: [PATCH 2/4] nits --- tests/models/mobilebert/test_modeling_mobilebert.py | 2 +- tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py | 2 +- tests/models/transfo_xl/test_modeling_transfo_xl.py | 2 +- tests/models/xglm/test_modeling_xglm.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/models/mobilebert/test_modeling_mobilebert.py b/tests/models/mobilebert/test_modeling_mobilebert.py index 5c25608a66d..21dafabaf8f 100644 --- a/tests/models/mobilebert/test_modeling_mobilebert.py +++ b/tests/models/mobilebert/test_modeling_mobilebert.py @@ -303,7 +303,7 @@ def test_resize_tokens_embeddings(self): super().test_resize_tokens_embeddings() @unnittest.skip("This test is currently broken because of safetensors.") - def test_tf_from_pt_safetensors(self) + def test_tf_from_pt_safetensors(self): pass def setUp(self): diff --git a/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py b/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py index f0a6a925be2..bea037e3593 100644 --- a/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py +++ b/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py @@ -198,7 +198,7 @@ def test_inputs_embeds(self): @unnittest.skip("This test is currently broken because of safetensors.") - def test_tf_from_pt_safetensors(self) + def test_tf_from_pt_safetensors(self): pass # speech2text2 has no base model diff --git a/tests/models/transfo_xl/test_modeling_transfo_xl.py b/tests/models/transfo_xl/test_modeling_transfo_xl.py index 0d34d6a0525..15a349141f2 100644 --- a/tests/models/transfo_xl/test_modeling_transfo_xl.py +++ b/tests/models/transfo_xl/test_modeling_transfo_xl.py @@ -491,7 +491,7 @@ def test_left_padding_compatibility(self): pass @unnittest.skip("This test is currently broken because of safetensors.") - def test_tf_from_pt_safetensors(self) + def test_tf_from_pt_safetensors(self): pass @require_torch diff --git a/tests/models/xglm/test_modeling_xglm.py b/tests/models/xglm/test_modeling_xglm.py index f3d2e229915..f66252ab4bd 100644 --- a/tests/models/xglm/test_modeling_xglm.py +++ b/tests/models/xglm/test_modeling_xglm.py @@ -358,7 +358,7 @@ def test_model_parallelism(self): super().test_model_parallelism() @unnittest.skip("This test is currently broken because of safetensors.") - def test_tf_from_pt_safetensors(self) + def test_tf_from_pt_safetensors(self): pass @require_torch From 270502a352d6e57350ebf9520bcbc52a20b82ed0 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 14 Nov 2023 10:16:37 +0100 Subject: [PATCH 3/4] style --- tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py | 1 - tests/models/transfo_xl/test_modeling_transfo_xl.py | 1 + tests/models/xglm/test_modeling_xglm.py | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py b/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py index bea037e3593..0476530a225 100644 --- a/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py +++ b/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py @@ -196,7 +196,6 @@ def setUp( def test_inputs_embeds(self): pass - @unnittest.skip("This test is currently broken because of safetensors.") def test_tf_from_pt_safetensors(self): pass diff --git a/tests/models/transfo_xl/test_modeling_transfo_xl.py b/tests/models/transfo_xl/test_modeling_transfo_xl.py index 15a349141f2..682f5257353 100644 --- a/tests/models/transfo_xl/test_modeling_transfo_xl.py +++ b/tests/models/transfo_xl/test_modeling_transfo_xl.py @@ -494,6 +494,7 @@ def test_left_padding_compatibility(self): def test_tf_from_pt_safetensors(self): pass + @require_torch class TransfoXLModelLanguageGenerationTest(unittest.TestCase): @slow diff --git a/tests/models/xglm/test_modeling_xglm.py b/tests/models/xglm/test_modeling_xglm.py index f66252ab4bd..c0d2d65e0ea 100644 --- a/tests/models/xglm/test_modeling_xglm.py +++ b/tests/models/xglm/test_modeling_xglm.py @@ -361,6 +361,7 @@ def test_model_parallelism(self): def test_tf_from_pt_safetensors(self): pass + @require_torch class XGLMModelLanguageGenerationTest(unittest.TestCase): def tearDown(self): From d775df4014086dd03629f9a314325bfa012362a0 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 14 Nov 2023 10:21:42 +0100 Subject: [PATCH 4/4] wow it's not my day --- tests/models/mobilebert/test_modeling_mobilebert.py | 2 +- tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py | 2 +- tests/models/transfo_xl/test_modeling_transfo_xl.py | 2 +- tests/models/xglm/test_modeling_xglm.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/models/mobilebert/test_modeling_mobilebert.py b/tests/models/mobilebert/test_modeling_mobilebert.py index 21dafabaf8f..a914ce578dc 100644 --- a/tests/models/mobilebert/test_modeling_mobilebert.py +++ b/tests/models/mobilebert/test_modeling_mobilebert.py @@ -302,7 +302,7 @@ def _prepare_for_class(self, inputs_dict, model_class, return_labels=False): def test_resize_tokens_embeddings(self): super().test_resize_tokens_embeddings() - @unnittest.skip("This test is currently broken because of safetensors.") + @unittest.skip("This test is currently broken because of safetensors.") def test_tf_from_pt_safetensors(self): pass diff --git a/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py b/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py index 0476530a225..b2220a9e74d 100644 --- a/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py +++ b/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py @@ -196,7 +196,7 @@ def setUp( def test_inputs_embeds(self): pass - @unnittest.skip("This test is currently broken because of safetensors.") + @unittest.skip("This test is currently broken because of safetensors.") def test_tf_from_pt_safetensors(self): pass diff --git a/tests/models/transfo_xl/test_modeling_transfo_xl.py b/tests/models/transfo_xl/test_modeling_transfo_xl.py index 682f5257353..d100ea381d6 100644 --- a/tests/models/transfo_xl/test_modeling_transfo_xl.py +++ b/tests/models/transfo_xl/test_modeling_transfo_xl.py @@ -490,7 +490,7 @@ def _mock_init_weights(self, module): def test_left_padding_compatibility(self): pass - @unnittest.skip("This test is currently broken because of safetensors.") + @unittest.skip("This test is currently broken because of safetensors.") def test_tf_from_pt_safetensors(self): pass diff --git a/tests/models/xglm/test_modeling_xglm.py b/tests/models/xglm/test_modeling_xglm.py index c0d2d65e0ea..5fa92c8082c 100644 --- a/tests/models/xglm/test_modeling_xglm.py +++ b/tests/models/xglm/test_modeling_xglm.py @@ -357,7 +357,7 @@ def test_model_from_pretrained(self): def test_model_parallelism(self): super().test_model_parallelism() - @unnittest.skip("This test is currently broken because of safetensors.") + @unittest.skip("This test is currently broken because of safetensors.") def test_tf_from_pt_safetensors(self): pass