From 1596a2dd921fe593b75a8d3e8e48f833e5cdc16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20G=C3=B6tz?= Date: Mon, 11 Dec 2023 16:12:40 +0100 Subject: [PATCH] In PreTrainedTokenizerBase add missing word in error message (#27949) "text input must of type" -> "text input must be of type" --- src/transformers/tokenization_utils_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transformers/tokenization_utils_base.py b/src/transformers/tokenization_utils_base.py index 9d68cb3ae58e7f..d868dd00adddc1 100644 --- a/src/transformers/tokenization_utils_base.py +++ b/src/transformers/tokenization_utils_base.py @@ -2858,13 +2858,13 @@ def _is_valid_text_input(t): if not _is_valid_text_input(text): raise ValueError( - "text input must of type `str` (single example), `List[str]` (batch or single pretokenized example) " + "text input must be of type `str` (single example), `List[str]` (batch or single pretokenized example) " "or `List[List[str]]` (batch of pretokenized examples)." ) if text_pair is not None and not _is_valid_text_input(text_pair): raise ValueError( - "text input must of type `str` (single example), `List[str]` (batch or single pretokenized example) " + "text input must be of type `str` (single example), `List[str]` (batch or single pretokenized example) " "or `List[List[str]]` (batch of pretokenized examples)." )