Fixing mbart50 with return_tensors argument too. (#13301)
* Fixing mbart50 with `return_tensors` argument too. * Adding mbart50 tokenization tests.
This commit is contained in:
@@ -229,7 +229,9 @@ class MBartOneToManyIntegrationTest(unittest.TestCase):
|
||||
|
||||
@require_torch
|
||||
def test_tokenizer_translation(self):
|
||||
inputs = self.tokenizer._build_translation_inputs("A test", src_lang="en_XX", tgt_lang="ar_AR")
|
||||
inputs = self.tokenizer._build_translation_inputs(
|
||||
"A test", return_tensors="pt", src_lang="en_XX", tgt_lang="ar_AR"
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
nested_simplify(inputs),
|
||||
|
||||
Reference in New Issue
Block a user