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
b62ac4d2
"docs/source/installation.mdx" did not exist on "6f840990a79d32634c82db534c047a5c4b549df8"
Unverified
Commit
b62ac4d2
authored
Mar 29, 2022
by
Sylvain Gugger
Committed by
GitHub
Mar 29, 2022
Browse files
Fix example test and test_fetcher for examples (#16478)
parent
86cff21c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
examples/pytorch/text-classification/run_glue.py
examples/pytorch/text-classification/run_glue.py
+2
-2
utils/tests_fetcher.py
utils/tests_fetcher.py
+2
-2
No files found.
examples/pytorch/text-classification/run_glue.py
View file @
b62ac4d2
...
...
@@ -519,11 +519,11 @@ def main():
if
task
==
"mnli-mm"
:
metrics
=
{
k
+
"_mm"
:
v
for
k
,
v
in
metrics
.
items
()}
if
"mnli"
in
task
:
if
task
is
not
None
and
"mnli"
in
task
:
combined
.
update
(
metrics
)
trainer
.
log_metrics
(
"eval"
,
metrics
)
trainer
.
save_metrics
(
"eval"
,
combined
if
"mnli"
in
task
else
metrics
)
trainer
.
save_metrics
(
"eval"
,
combined
if
task
is
not
None
and
"mnli"
in
task
else
metrics
)
if
training_args
.
do_predict
:
logger
.
info
(
"*** Predict ***"
)
...
...
utils/tests_fetcher.py
View file @
b62ac4d2
...
...
@@ -465,9 +465,9 @@ def infer_tests_to_run(output_file, diff_with_last_commit=False, filters=None):
test_files_to_run
.
append
(
f
)
# Example files are tested separately
elif
f
.
startswith
(
"examples/pytorch"
):
test_files_to_run
.
append
(
"examples/pytorch/test_examples.py"
)
test_files_to_run
.
append
(
"examples/pytorch/test_
pytorch_
examples.py"
)
elif
f
.
startswith
(
"examples/flax"
):
test_files_to_run
.
append
(
"examples/flax/test_examples.py"
)
test_files_to_run
.
append
(
"examples/flax/test_
flax_
examples.py"
)
else
:
new_tests
=
module_to_test_file
(
f
)
if
new_tests
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