Unverified Commit 98268b2e authored by Maziyar Panahi's avatar Maziyar Panahi Committed by GitHub
Browse files

Add id2label and label2id to model's config in run_xnil (#22558)

Add id2label and label2id to config in run_xnil
parent fa2bdffc
......@@ -273,6 +273,8 @@ def main():
config = AutoConfig.from_pretrained(
model_args.config_name if model_args.config_name else model_args.model_name_or_path,
num_labels=num_labels,
id2label={str(i): label for i, label in enumerate(label_list)},
label2id={label: i for i, label in enumerate(label_list)},
finetuning_task="xnli",
cache_dir=model_args.cache_dir,
revision=model_args.model_revision,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment