Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
417bb914
Unverified
Commit
417bb914
authored
Dec 11, 2023
by
Peter Götz
Committed by
GitHub
Dec 11, 2023
Browse files
In PreTrainedTokenizerBase add missing word in error message (#27949)
"text input must of type" -> "text input must be of type"
parent
5cec306c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/tokenization_utils_base.py
src/transformers/tokenization_utils_base.py
+2
-2
No files found.
src/transformers/tokenization_utils_base.py
View file @
417bb914
...
...
@@ -2858,13 +2858,13 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
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)."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment