From 63dd838b58bae5e51d9b7c1653971e84bef3f4fa Mon Sep 17 00:00:00 2001 From: "Wang, Yi" Date: Mon, 28 Oct 2024 08:27:02 -0400 Subject: [PATCH 1/2] fix speecht5 failure issue in test_peft_gradient_checkpointing_enable_disable Signed-off-by: Wang, Yi --- .../models/speecht5/modeling_speecht5.py | 2 +- tests/models/speecht5/test_modeling_speecht5.py | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/transformers/models/speecht5/modeling_speecht5.py b/src/transformers/models/speecht5/modeling_speecht5.py index 63b536d185a..72cbe6b14a9 100644 --- a/src/transformers/models/speecht5/modeling_speecht5.py +++ b/src/transformers/models/speecht5/modeling_speecht5.py @@ -2114,7 +2114,7 @@ def get_input_embeddings(self): return self.encoder.get_input_embeddings() if isinstance(self.decoder, SpeechT5DecoderWithTextPrenet): return self.decoder.get_input_embeddings() - return None + raise NotImplementedError def set_input_embeddings(self, value): if isinstance(self.encoder, SpeechT5EncoderWithTextPrenet): diff --git a/tests/models/speecht5/test_modeling_speecht5.py b/tests/models/speecht5/test_modeling_speecht5.py index 97abf1a2cf2..38f75ac5c01 100644 --- a/tests/models/speecht5/test_modeling_speecht5.py +++ b/tests/models/speecht5/test_modeling_speecht5.py @@ -237,12 +237,6 @@ def test_torchscript_output_hidden_state(self): def test_torchscript_simple(self): pass - @unittest.skip( - reason="Model returns None for input_embeds, check: https://github.com/huggingface/transformers/issues/33527" - ) - def test_peft_gradient_checkpointing_enable_disable(self): - pass - @require_torch class SpeechT5ForSpeechToTextTester: @@ -1741,12 +1735,6 @@ def test_training_gradient_checkpointing_use_reentrant(self): def test_training_gradient_checkpointing_use_reentrant_false(self): pass - @unittest.skip( - reason="Model returns None for input_embeds, check: https://github.com/huggingface/transformers/issues/33527" - ) - def test_peft_gradient_checkpointing_enable_disable(self): - pass - # overwrite from test_modeling_common def _mock_init_weights(self, module): if hasattr(module, "weight") and module.weight is not None: From 6e503f084f0ce73b0e436fe06815cf2edae68de7 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 3 Dec 2024 13:24:06 +0000 Subject: [PATCH 2/2] [run-slow] speecht5