Skip to content

Commit 34fee35

Browse files
ydshiehelusenji
authored andcommitted
Fix test_t5_decoder_model_past_large_inputs (huggingface#17320)
Co-authored-by: ydshieh <[email protected]>
1 parent 06ae39b commit 34fee35

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/models/t5/test_modeling_tf_t5.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,13 @@ def test_t5_decoder_model_past_with_attn_mask(self):
295295

296296
def test_t5_decoder_model_past_large_inputs(self):
297297
config_and_inputs = self.model_tester.prepare_config_and_inputs()
298+
299+
# `create_and_check_t5_decoder_model_past_large_inputs` has special inputs:
300+
# (config, input_ids, decoder_input_ids, attention_mask)
301+
# and we have to prepare it correctly here.
302+
config, input_ids, input_mask, token_labels = config_and_inputs
303+
config_and_inputs = (config, input_ids, None, input_mask)
304+
298305
self.model_tester.create_and_check_t5_decoder_model_past_large_inputs(*config_and_inputs)
299306

300307
def test_t5_model_xla_generate_fast(self):

0 commit comments

Comments
 (0)