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
8e74eca7
Unverified
Commit
8e74eca7
authored
Dec 27, 2020
by
Patrick von Platen
Committed by
GitHub
Dec 27, 2020
Browse files
push (#9320)
parent
61443cd7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/transformers/trainer_seq2seq.py
src/transformers/trainer_seq2seq.py
+3
-1
No files found.
src/transformers/trainer_seq2seq.py
View file @
8e74eca7
...
@@ -171,7 +171,9 @@ class Seq2SeqTrainer(Trainer):
...
@@ -171,7 +171,9 @@ class Seq2SeqTrainer(Trainer):
"""
"""
if
not
self
.
args
.
predict_with_generate
or
prediction_loss_only
:
if
not
self
.
args
.
predict_with_generate
or
prediction_loss_only
:
return
super
()(
self
,
model
,
inputs
,
prediction_loss_only
=
prediction_loss_only
,
ignore_keys
=
ignore_keys
)
return
super
().
prediction_step
(
model
,
inputs
,
prediction_loss_only
=
prediction_loss_only
,
ignore_keys
=
ignore_keys
)
has_labels
=
"labels"
in
inputs
has_labels
=
"labels"
in
inputs
inputs
=
self
.
_prepare_inputs
(
inputs
)
inputs
=
self
.
_prepare_inputs
(
inputs
)
...
...
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