Skip to content

Commit

Permalink
Default to accuracy metric (huggingface#11405)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger committed Apr 23, 2021
1 parent e3ff165 commit 1ef152e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/pytorch/text-classification/run_glue_no_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ def preprocess_function(examples):
# 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
Expand Down

0 comments on commit 1ef152e

Please sign in to comment.