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
bd9dca3b
Unverified
Commit
bd9dca3b
authored
Jul 22, 2024
by
Arthur
Committed by
GitHub
Jul 22, 2024
Browse files
set warning level to info for special tokens have been added (#32138)
fixes #7002
parent
817a676b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/tokenization_utils_base.py
src/transformers/tokenization_utils_base.py
+1
-1
No files found.
src/transformers/tokenization_utils_base.py
View file @
bd9dca3b
...
@@ -2506,7 +2506,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
...
@@ -2506,7 +2506,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
)
)
if
added_tokens_decoder
!=
{}
and
max
(
list
(
added_tokens_decoder
.
keys
())[
-
1
],
0
)
>
tokenizer
.
vocab_size
:
if
added_tokens_decoder
!=
{}
and
max
(
list
(
added_tokens_decoder
.
keys
())[
-
1
],
0
)
>
tokenizer
.
vocab_size
:
logger
.
warning_advice
(
logger
.
info
(
"Special tokens have been added in the vocabulary, make sure the associated word embeddings are"
"Special tokens have been added in the vocabulary, make sure the associated word embeddings are"
" fine-tuned or trained."
" fine-tuned or trained."
)
)
...
...
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