Default to accuracy metric (#11405)

This commit is contained in:
Sylvain Gugger 2021-04-23 14:49:59 -04:00 committed by GitHub
parent e3ff165aa5
commit 1ef152eb48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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