Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
5c30dd40
Unverified
Commit
5c30dd40
authored
Nov 27, 2023
by
Arthur
Committed by
GitHub
Nov 27, 2023
Browse files
fix warning (#27689)
parent
e11e26df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/generation/configuration_utils.py
src/transformers/generation/configuration_utils.py
+1
-1
No files found.
src/transformers/generation/configuration_utils.py
View file @
5c30dd40
...
@@ -410,7 +410,7 @@ class GenerationConfig(PushToHubMixin):
...
@@ -410,7 +410,7 @@ class GenerationConfig(PushToHubMixin):
# 2. detect beam-only parameterization when not in beam mode
# 2. detect beam-only parameterization when not in beam mode
if
self
.
num_beams
is
None
:
if
self
.
num_beams
is
None
:
logg
ing
.
warn
ing
(
"`num_beams` is set to None - defaulting to 1."
,
UserWarning
)
warn
ing
s
.
warn
(
"`num_beams` is set to None - defaulting to 1."
,
UserWarning
)
self
.
num_beams
=
1
self
.
num_beams
=
1
if
self
.
num_beams
==
1
:
if
self
.
num_beams
==
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