Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsRogge committed Dec 28, 2023
1 parent 41164bb commit 4320b1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_tokenization_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2624,7 +2624,8 @@ def test_prepare_seq2seq_batch(self):
src_texts=src_text, max_length=3, max_target_length=10, return_tensors="pt"
)
self.assertEqual(batch_encoder_only.input_ids.shape[1], 3)
self.assertEqual(batch_encoder_only.attention_mask.shape[1], 3)
if "attention_mask" in tokenizer.model_input_names:
self.assertEqual(batch_encoder_only.attention_mask.shape[1], 3)
self.assertNotIn("decoder_input_ids", batch_encoder_only)

def test_is_fast(self):
Expand Down

0 comments on commit 4320b1c

Please sign in to comment.