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
3ed5e97b
Unverified
Commit
3ed5e97b
authored
Apr 22, 2021
by
Sylvain Gugger
Committed by
GitHub
Apr 22, 2021
Browse files
Fix Trainer with remove_unused_columns=False (#11382)
* Fix Trainer with remove_unused_columns=False * Typo
parent
0f3ad150
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/trainer.py
src/transformers/trainer.py
+1
-1
No files found.
src/transformers/trainer.py
View file @
3ed5e97b
...
@@ -482,7 +482,7 @@ class Trainer:
...
@@ -482,7 +482,7 @@ class Trainer:
def
_remove_unused_columns
(
self
,
dataset
:
"datasets.Dataset"
,
description
:
Optional
[
str
]
=
None
):
def
_remove_unused_columns
(
self
,
dataset
:
"datasets.Dataset"
,
description
:
Optional
[
str
]
=
None
):
if
not
self
.
args
.
remove_unused_columns
:
if
not
self
.
args
.
remove_unused_columns
:
return
return
dataset
if
self
.
_signature_columns
is
None
:
if
self
.
_signature_columns
is
None
:
# Inspect model forward signature to keep only the arguments it accepts.
# Inspect model forward signature to keep only the arguments it accepts.
signature
=
inspect
.
signature
(
self
.
model
.
forward
)
signature
=
inspect
.
signature
(
self
.
model
.
forward
)
...
...
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