You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"Your dataset {dataset_name} has a `messages` column, but no tokenizer was provided. Are you sure you are using a tokenizer that supports chat templates?"
137
+
)
138
+
ifnothasattr(tokenizer, "apply_chat_template"):
139
+
raiseValueError(
140
+
f"Your dataset {dataset_name} has a `messages` column, but the tokenizer does not have an `apply_chat_template` method. Are you sure you are using a tokenizer that supports chat templates?"
141
+
)
142
+
texts= []
143
+
print(
144
+
f"Using dataset with columns of {dataset_name}: messages and tools to apply chat template."
145
+
)
146
+
fori, sampleinenumerate(dataset):
147
+
messages=sample.get("messages", [])
148
+
kwargs= {}
149
+
tools=sample.get("tools", [])
150
+
iftools:
151
+
kwargs["tools"] =tools
152
+
ifnotmessages:
153
+
raiseValueError(
154
+
f"Column {i} in dataset {dataset_name} has no messages, or a empty messages."
0 commit comments