"test/srt/vscode:/vscode.git/clone" did not exist on "0194948fd96802ea41d6baa3673e9d42cfa5dc8c"
Unverified Commit 57a66269 authored by Yusuke Mori's avatar Yusuke Mori Committed by GitHub
Browse files

[examples/text-classification] Fix a bug for using one's own dataset of a regression task (#9411)

parent 189387e9
......@@ -289,7 +289,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 data_args.task_name is None:
elif data_args.task_name is None and not is_regression:
label_to_id = {v: i for i, v in enumerate(label_list)}
def preprocess_function(examples):
......
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