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
0cffa424
Unverified
Commit
0cffa424
authored
Sep 24, 2020
by
Jabin Huang
Committed by
GitHub
Sep 24, 2020
Browse files
Updata tokenization_auto.py (#6870)
Updata tokenization_auto.py to handle Inherited tokenizer
parent
03fb8e79
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/tokenization_auto.py
src/transformers/tokenization_auto.py
+1
-1
No files found.
src/transformers/tokenization_auto.py
View file @
0cffa424
...
...
@@ -244,7 +244,7 @@ class AutoTokenizer:
config
=
config
.
encoder
for
config_class
,
(
tokenizer_class_py
,
tokenizer_class_fast
)
in
TOKENIZER_MAPPING
.
items
():
if
isinstanc
e
(
config
,
config_class
)
:
if
typ
e
(
config
)
is
config_class
:
if
tokenizer_class_fast
and
use_fast
:
return
tokenizer_class_fast
.
from_pretrained
(
pretrained_model_name_or_path
,
*
inputs
,
**
kwargs
)
else
:
...
...
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