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
1e8e0686
Unverified
Commit
1e8e0686
authored
May 03, 2021
by
Nicolas Patry
Committed by
GitHub
May 03, 2021
Browse files
Fixes a useless warning. (#11566)
Fixes #11525
parent
87dd1a00
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
src/transformers/generation_utils.py
src/transformers/generation_utils.py
+0
-6
No files found.
src/transformers/generation_utils.py
View file @
1e8e0686
...
@@ -959,12 +959,6 @@ class GenerationMixin:
...
@@ -959,12 +959,6 @@ class GenerationMixin:
)
)
stopping_criteria
=
self
.
_get_stopping_criteria
(
max_length
=
max_length
,
max_time
=
max_time
)
stopping_criteria
=
self
.
_get_stopping_criteria
(
max_length
=
max_length
,
max_time
=
max_time
)
if
max_length
is
not
None
:
warnings
.
warn
(
"`max_length` is deprecated in this function, use `stopping_criteria=StoppingCriteriaList(MaxLengthCriteria(max_length=max_length))` instead."
,
UserWarning
,
)
stopping_criteria
=
validate_stopping_criteria
(
stopping_criteria
,
max_length
)
if
is_greedy_gen_mode
:
if
is_greedy_gen_mode
:
if
num_return_sequences
>
1
:
if
num_return_sequences
>
1
:
...
...
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