Skip to content

Commit

Permalink
In PreTrainedTokenizerBase add missing word in error message (hugging…
Browse files Browse the repository at this point in the history
…face#27949)

"text input must of type" -> "text input must be of type"
  • Loading branch information
petergtz authored and iantbutler01 committed Dec 16, 2023
1 parent e29e121 commit 1596a2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/tokenization_utils_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
)

Expand Down

0 comments on commit 1596a2d

Please sign in to comment.