Unverified Commit a637ae00 authored by Lysandre Debut's avatar Lysandre Debut Committed by GitHub
Browse files

Fixes Pegasus tokenization tests (#10671)

parent 7e442874
...@@ -356,7 +356,7 @@ class TFPegasusIntegrationTests(unittest.TestCase): ...@@ -356,7 +356,7 @@ class TFPegasusIntegrationTests(unittest.TestCase):
assert self.expected_text == generated_words assert self.expected_text == generated_words
def translate_src_text(self, **tokenizer_kwargs): def translate_src_text(self, **tokenizer_kwargs):
model_inputs = self.tokenizer(self.src_text, **tokenizer_kwargs, return_tensors="tf") model_inputs = self.tokenizer(self.src_text, **tokenizer_kwargs, padding=True, return_tensors="tf")
generated_ids = self.model.generate( generated_ids = self.model.generate(
model_inputs.input_ids, model_inputs.input_ids,
attention_mask=model_inputs.attention_mask, attention_mask=model_inputs.attention_mask,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment