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
028d4b7c
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "fb13a7df95f4d378cbd80e2f0014d67d26eb2778"
Unverified
Commit
028d4b7c
authored
Jun 01, 2022
by
fireindark707
Committed by
GitHub
Jun 01, 2022
Browse files
Deal with the error when task is regression (#16330)
parent
84aaadd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/pytorch/text-classification/run_glue_no_trainer.py
examples/pytorch/text-classification/run_glue_no_trainer.py
+1
-1
No files found.
examples/pytorch/text-classification/run_glue_no_trainer.py
View file @
028d4b7c
...
@@ -343,7 +343,7 @@ def main():
...
@@ -343,7 +343,7 @@ def main():
f
"model labels:
{
list
(
sorted
(
label_name_to_id
.
keys
()))
}
, dataset labels:
{
list
(
sorted
(
label_list
))
}
."
f
"model labels:
{
list
(
sorted
(
label_name_to_id
.
keys
()))
}
, dataset labels:
{
list
(
sorted
(
label_list
))
}
."
"
\n
Ignoring the model labels as a result."
,
"
\n
Ignoring the model labels as a result."
,
)
)
elif
args
.
task_name
is
None
:
elif
args
.
task_name
is
None
and
not
is_regression
:
label_to_id
=
{
v
:
i
for
i
,
v
in
enumerate
(
label_list
)}
label_to_id
=
{
v
:
i
for
i
,
v
in
enumerate
(
label_list
)}
if
label_to_id
is
not
None
:
if
label_to_id
is
not
None
:
...
...
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