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
ef6741fe
"benchmark/git@developer.sourcefind.cn:change/sglang.git" did not exist on "64129fa632c03aef6c222e202b1d5eda84f994bf"
Unverified
Commit
ef6741fe
authored
Sep 21, 2022
by
Leandro von Werra
Committed by
GitHub
Sep 21, 2022
Browse files
Fix GLUE MNLI when using `max_eval_samples` (#18722)
parent
18643ff2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
examples/pytorch/text-classification/run_glue.py
examples/pytorch/text-classification/run_glue.py
+5
-1
No files found.
examples/pytorch/text-classification/run_glue.py
View file @
ef6741fe
...
@@ -549,7 +549,11 @@ def main():
...
@@ -549,7 +549,11 @@ def main():
eval_datasets
=
[
eval_dataset
]
eval_datasets
=
[
eval_dataset
]
if
data_args
.
task_name
==
"mnli"
:
if
data_args
.
task_name
==
"mnli"
:
tasks
.
append
(
"mnli-mm"
)
tasks
.
append
(
"mnli-mm"
)
eval_datasets
.
append
(
raw_datasets
[
"validation_mismatched"
])
valid_mm_dataset
=
raw_datasets
[
"validation_mismatched"
]
if
data_args
.
max_eval_samples
is
not
None
:
max_eval_samples
=
min
(
len
(
valid_mm_dataset
),
data_args
.
max_eval_samples
)
valid_mm_dataset
=
valid_mm_dataset
.
select
(
range
(
max_eval_samples
))
eval_datasets
.
append
(
valid_mm_dataset
)
combined
=
{}
combined
=
{}
for
eval_dataset
,
task
in
zip
(
eval_datasets
,
tasks
):
for
eval_dataset
,
task
in
zip
(
eval_datasets
,
tasks
):
...
...
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