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
ff8dcb5e
Unverified
Commit
ff8dcb5e
authored
Jan 06, 2023
by
Observer46
Committed by
GitHub
Jan 06, 2023
Browse files
Fix arguments passed to predict function in QA Seq2seq training script (#21026)
fix args passed to predict function
parent
35a7052b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/pytorch/question-answering/trainer_seq2seq_qa.py
examples/pytorch/question-answering/trainer_seq2seq_qa.py
+1
-1
No files found.
examples/pytorch/question-answering/trainer_seq2seq_qa.py
View file @
ff8dcb5e
...
...
@@ -151,7 +151,7 @@ class QuestionAnsweringSeq2SeqTrainer(Seq2SeqTrainer):
if
self
.
post_process_function
is
None
or
self
.
compute_metrics
is
None
:
return
output
predictions
=
self
.
post_process_function
(
predict_examples
,
predict_dataset
,
output
.
predictions
,
"predict"
)
predictions
=
self
.
post_process_function
(
predict_examples
,
predict_dataset
,
output
,
"predict"
)
metrics
=
self
.
compute_metrics
(
predictions
)
# Prefix all keys with metric_key_prefix + '_'
...
...
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