Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/pytorch/text-classification/run_glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,11 @@ def compute_metrics(p: EvalPrediction):

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 ***")
Expand Down
4 changes: 2 additions & 2 deletions utils/tests_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down