Deal with the error when task is regression (#16330)
This commit is contained in:
@@ -343,7 +343,7 @@ def main():
|
||||
f"model labels: {list(sorted(label_name_to_id.keys()))}, dataset labels: {list(sorted(label_list))}."
|
||||
"\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)}
|
||||
|
||||
if label_to_id is not None:
|
||||
|
||||
Reference in New Issue
Block a user