"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "fb13a7df95f4d378cbd80e2f0014d67d26eb2778"
Unverified Commit 028d4b7c authored by fireindark707's avatar fireindark707 Committed by GitHub
Browse files

Deal with the error when task is regression (#16330)

parent 84aaadd8
...@@ -343,7 +343,7 @@ def main(): ...@@ -343,7 +343,7 @@ def main():
f"model labels: {list(sorted(label_name_to_id.keys()))}, dataset labels: {list(sorted(label_list))}." f"model labels: {list(sorted(label_name_to_id.keys()))}, dataset labels: {list(sorted(label_list))}."
"\nIgnoring the model labels as a result.", "\nIgnoring the model labels as a result.",
) )
elif args.task_name is None: elif args.task_name is None and not is_regression:
label_to_id = {v: i for i, v in enumerate(label_list)} label_to_id = {v: i for i, v in enumerate(label_list)}
if label_to_id is not None: if label_to_id is not None:
......
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