Skip to content

Commit

Permalink
Fix Trainer with remove_unused_columns=False (#11382)
Browse files Browse the repository at this point in the history
* Fix Trainer with remove_unused_columns=False

* Typo
  • Loading branch information
sgugger authored Apr 22, 2021
1 parent 0f3ad15 commit 3ed5e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def remove_callback(self, callback):

def _remove_unused_columns(self, dataset: "datasets.Dataset", description: Optional[str] = None):
if not self.args.remove_unused_columns:
return
return dataset
if self._signature_columns is None:
# Inspect model forward signature to keep only the arguments it accepts.
signature = inspect.signature(self.model.forward)
Expand Down

0 comments on commit 3ed5e97

Please sign in to comment.