From 059bb258174319ef1ade3d7179889dd99b1cfb4e Mon Sep 17 00:00:00 2001 From: Yusuke Mori Date: Wed, 27 Jan 2021 04:32:19 +0900 Subject: [PATCH] Fix a bug in run_glue.py (#9812) (#9815) --- examples/text-classification/run_glue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/text-classification/run_glue.py b/examples/text-classification/run_glue.py index 269d0dd03..2ba141185 100644 --- a/examples/text-classification/run_glue.py +++ b/examples/text-classification/run_glue.py @@ -317,7 +317,7 @@ def main(): if ( model.config.label2id != PretrainedConfig(num_labels=num_labels).label2id and data_args.task_name is not None - and is_regression + and not is_regression ): # Some have all caps in their config, some don't. label_name_to_id = {k.lower(): v for k, v in model.config.label2id.items()}