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
a009fbda
"configs/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "80aced8199053b7da52ee3ebe42886d5699fb14d"
Unverified
Commit
a009fbda
authored
Jul 23, 2024
by
amyeroberts
Committed by
GitHub
Jul 23, 2024
Browse files
Fix typing to be compatible with later py versions (#32155)
parent
3263b343
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 @
a009fbda
...
@@ -1948,7 +1948,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
...
@@ -1948,7 +1948,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
return
self
.
_rendered_blocks
or
self
.
_generation_indices
return
self
.
_rendered_blocks
or
self
.
_generation_indices
@
contextmanager
@
contextmanager
def
activate_tracker
(
self
,
rendered_blocks
:
l
ist
[
int
],
generation_indices
:
l
ist
[
int
]):
def
activate_tracker
(
self
,
rendered_blocks
:
L
ist
[
int
],
generation_indices
:
L
ist
[
int
]):
try
:
try
:
if
self
.
is_active
():
if
self
.
is_active
():
raise
ValueError
(
"AssistantTracker should not be reused before closed"
)
raise
ValueError
(
"AssistantTracker should not be reused before closed"
)
...
...
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