fix dataset

This commit is contained in:
hiyouga 2024-01-18 12:59:30 +08:00
parent f1067d2b58
commit 487dee066f
2 changed files with 281250 additions and 279046 deletions

File diff suppressed because one or more lines are too long

View File

@ -60,7 +60,7 @@ def convert_sharegpt(examples: Dict[str, List[Any]], dataset_attr: "DatasetAttr"
accept_tags = [dataset_attr.assistant_tag, dataset_attr.function_tag] accept_tags = [dataset_attr.assistant_tag, dataset_attr.function_tag]
if message[dataset_attr.role_tag] not in accept_tags: if message[dataset_attr.role_tag] not in accept_tags:
raise ValueError("Invalid role tag.") raise ValueError("Invalid role tag in {}.".format(messages))
prompt.append({"role": tag_mapping[message[dataset_attr.role_tag]], "content": message[dataset_attr.content_tag]}) prompt.append({"role": tag_mapping[message[dataset_attr.role_tag]], "content": message[dataset_attr.content_tag]})