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
1ef152eb
Unverified
Commit
1ef152eb
authored
Apr 23, 2021
by
Sylvain Gugger
Committed by
GitHub
Apr 23, 2021
Browse files
Default to accuracy metric (#11405)
parent
e3ff165a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
examples/pytorch/text-classification/run_glue_no_trainer.py
examples/pytorch/text-classification/run_glue_no_trainer.py
+2
-0
No files found.
examples/pytorch/text-classification/run_glue_no_trainer.py
View file @
1ef152eb
...
...
@@ -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
...
...
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