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
5f2791c7
Unverified
Commit
5f2791c7
authored
Jul 15, 2021
by
SaulLu
Committed by
GitHub
Jul 15, 2021
Browse files
Replace specific tokenizer in log message by AutoTokenizer (#12745)
parent
31cfcbd3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
src/transformers/models/deberta_v2/tokenization_deberta_v2.py
...transformers/models/deberta_v2/tokenization_deberta_v2.py
+1
-1
src/transformers/models/mpnet/tokenization_mpnet.py
src/transformers/models/mpnet/tokenization_mpnet.py
+1
-1
src/transformers/models/prophetnet/tokenization_prophetnet.py
...transformers/models/prophetnet/tokenization_prophetnet.py
+1
-1
src/transformers/models/roformer/tokenization_roformer.py
src/transformers/models/roformer/tokenization_roformer.py
+1
-1
No files found.
src/transformers/models/deberta_v2/tokenization_deberta_v2.py
View file @
5f2791c7
...
...
@@ -137,7 +137,7 @@ class DebertaV2Tokenizer(PreTrainedTokenizer):
if
not
os
.
path
.
isfile
(
vocab_file
):
raise
ValueError
(
f
"Can't find a vocabulary file at path '
{
vocab_file
}
'. To load the vocabulary from a Google pretrained "
"model use `tokenizer =
DebertaV2
Tokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`"
"model use `tokenizer =
Auto
Tokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`"
)
self
.
do_lower_case
=
do_lower_case
self
.
split_by_punct
=
split_by_punct
...
...
src/transformers/models/mpnet/tokenization_mpnet.py
View file @
5f2791c7
...
...
@@ -170,7 +170,7 @@ class MPNetTokenizer(PreTrainedTokenizer):
if
not
os
.
path
.
isfile
(
vocab_file
):
raise
ValueError
(
f
"Can't find a vocabulary file at path '
{
vocab_file
}
'. To load the vocabulary from a Google pretrained "
"model use `tokenizer =
Bert
Tokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`"
"model use `tokenizer =
Auto
Tokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`"
)
self
.
vocab
=
load_vocab
(
vocab_file
)
self
.
ids_to_tokens
=
collections
.
OrderedDict
([(
ids
,
tok
)
for
tok
,
ids
in
self
.
vocab
.
items
()])
...
...
src/transformers/models/prophetnet/tokenization_prophetnet.py
View file @
5f2791c7
...
...
@@ -136,7 +136,7 @@ class ProphetNetTokenizer(PreTrainedTokenizer):
if
not
os
.
path
.
isfile
(
vocab_file
):
raise
ValueError
(
f
"Can't find a vocabulary file at path '
{
vocab_file
}
'. To load the vocabulary from a Google pretrained "
"model use `tokenizer =
ProphetNet
Tokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`"
"model use `tokenizer =
Auto
Tokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`"
)
self
.
vocab
=
load_vocab
(
vocab_file
)
self
.
ids_to_tokens
=
collections
.
OrderedDict
([(
ids
,
tok
)
for
tok
,
ids
in
self
.
vocab
.
items
()])
...
...
src/transformers/models/roformer/tokenization_roformer.py
View file @
5f2791c7
...
...
@@ -144,7 +144,7 @@ class RoFormerTokenizer(PreTrainedTokenizer):
if
not
os
.
path
.
isfile
(
vocab_file
):
raise
ValueError
(
f
"Can't find a vocabulary file at path '
{
vocab_file
}
'. To load the vocabulary from a Google pretrained "
"model use `tokenizer =
RoFormer
Tokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`"
"model use `tokenizer =
Auto
Tokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`"
)
self
.
vocab
=
load_vocab
(
vocab_file
)
self
.
ids_to_tokens
=
collections
.
OrderedDict
([(
ids
,
tok
)
for
tok
,
ids
in
self
.
vocab
.
items
()])
...
...
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