From 4658896ee105c504eba23db2efefc5fe14191b81 Mon Sep 17 00:00:00 2001 From: Sam Shleifer Date: Mon, 11 May 2020 11:47:51 -0400 Subject: [PATCH] [Marian] Fix typo in docstring (#4284) --- src/transformers/modeling_marian.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/modeling_marian.py b/src/transformers/modeling_marian.py index 0592e72113..1953b479fc 100644 --- a/src/transformers/modeling_marian.py +++ b/src/transformers/modeling_marian.py @@ -37,7 +37,7 @@ class MarianMTModel(BartForConditionalGeneration): tok = MarianTokenizer.from_pretrained(mname) batch = tok.prepare_translation_batch(src_texts=[sample_text]) # don't need tgt_text for inference gen = model.generate(**batch) # for forward pass: model(**batch) - words: List[str] = tok.decode_batch(gen, skip_special_tokens=True) # returns "Where is the the bus stop ?" + words: List[str] = tok.batch_decode(gen, skip_special_tokens=True) # returns "Where is the the bus stop ?" """