From 1ef152eb48e777f9ff848d55e3ade9a47705745f Mon Sep 17 00:00:00 2001 From: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Date: Fri, 23 Apr 2021 14:49:59 -0400 Subject: [PATCH] Default to accuracy metric (#11405) --- examples/pytorch/text-classification/run_glue_no_trainer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pytorch/text-classification/run_glue_no_trainer.py b/examples/pytorch/text-classification/run_glue_no_trainer.py index 646d6e93f6..f2658db9e6 100644 --- a/examples/pytorch/text-classification/run_glue_no_trainer.py +++ b/examples/pytorch/text-classification/run_glue_no_trainer.py @@ -367,6 +367,8 @@ def main(): # Get the metric function if args.task_name is not None: metric = load_metric("glue", args.task_name) + else: + metric = load_metric("accuracy") # Train! total_batch_size = args.per_device_train_batch_size * accelerator.num_processes * args.gradient_accumulation_steps