Fix old Seq2SeqTrainer (#9675)

This commit is contained in:
Sylvain Gugger
2021-01-19 09:56:25 -05:00
committed by GitHub
parent d302d88b47
commit 97b787fb4e

View File

@@ -60,7 +60,7 @@ class Seq2SeqTrainer(Trainer):
assert isinstance( assert isinstance(
self.model, PreTrainedModel self.model, PreTrainedModel
), f"If no `config` is passed the model to be trained has to be of type `PreTrainedModel`, but is {self.model.__class__}" ), f"If no `config` is passed the model to be trained has to be of type `PreTrainedModel`, but is {self.model.__class__}"
self.config = self._actual_model(self.model).config self.config = self.model.config
else: else:
self.config = config self.config = config