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
fce52cef
"docs/source/vscode:/vscode.git/clone" did not exist on "7f9195090160d508c7afb2e444e34f181872dd10"
Unverified
Commit
fce52cef
authored
Apr 02, 2024
by
Mario Šaško
Committed by
GitHub
Apr 02, 2024
Browse files
Fix `remove_columns` in `text-classification` example (#29351)
parent
5080ab12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/pytorch/text-classification/run_classification.py
examples/pytorch/text-classification/run_classification.py
+1
-1
No files found.
examples/pytorch/text-classification/run_classification.py
View file @
fce52cef
...
...
@@ -422,7 +422,7 @@ def main():
for
split
in
raw_datasets
.
keys
():
for
column
in
data_args
.
remove_columns
.
split
(
","
):
logger
.
info
(
f
"removing column
{
column
}
from split
{
split
}
"
)
raw_datasets
[
split
].
remove_columns
(
column
)
raw_datasets
[
split
]
=
raw_datasets
[
split
].
remove_columns
(
column
)
if
data_args
.
label_column_name
is
not
None
and
data_args
.
label_column_name
!=
"label"
:
for
key
in
raw_datasets
.
keys
():
...
...
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