From 8e74eca7f2b3235f8d5340d66361ea656c67bac7 Mon Sep 17 00:00:00 2001 From: Patrick von Platen Date: Sun, 27 Dec 2020 21:57:50 +0100 Subject: [PATCH] push (#9320) --- src/transformers/trainer_seq2seq.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/transformers/trainer_seq2seq.py b/src/transformers/trainer_seq2seq.py index 4fc7eb59b6..9ca93535e8 100644 --- a/src/transformers/trainer_seq2seq.py +++ b/src/transformers/trainer_seq2seq.py @@ -171,7 +171,9 @@ class Seq2SeqTrainer(Trainer): """ 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 inputs = self._prepare_inputs(inputs)