From 08bfc1718a001513202c8b18b00ce592a797af9a Mon Sep 17 00:00:00 2001 From: Xi Ye Date: Wed, 16 Sep 2020 06:40:57 -0500 Subject: [PATCH] fix the warning message of overflowed sequence (#7151) --- src/transformers/tokenization_utils_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/tokenization_utils_base.py b/src/transformers/tokenization_utils_base.py index b3b72fa339..54adcad75a 100644 --- a/src/transformers/tokenization_utils_base.py +++ b/src/transformers/tokenization_utils_base.py @@ -2477,7 +2477,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin): logger.warning( "Token indices sequence length is longer than the specified maximum sequence length " "for this model ({} > {}). Running this sequence through the model will result in " - "indexing errors".format(len(ids), self.model_max_length) + "indexing errors".format(len(encoded_inputs["input_ids"]), self.model_max_length) ) # Padding