Error msg for sharegpt if conv has less than 2 msg (#379)
Browse files- src/axolotl/prompters.py +3 -1
src/axolotl/prompters.py
CHANGED
|
@@ -312,7 +312,9 @@ class ShareGPTPrompter: # pylint: disable=too-few-public-methods
|
|
| 312 |
if len(source) < 2:
|
| 313 |
# If there isn't a back and forth conversation, ignore it
|
| 314 |
# also happens on the data splitting leaving empty conversations
|
| 315 |
-
raise IndexError
|
|
|
|
|
|
|
| 316 |
|
| 317 |
conv = self._conversation.copy()
|
| 318 |
roles = {"human": conv.roles[0], "gpt": conv.roles[1]}
|
|
|
|
| 312 |
if len(source) < 2:
|
| 313 |
# If there isn't a back and forth conversation, ignore it
|
| 314 |
# also happens on the data splitting leaving empty conversations
|
| 315 |
+
raise IndexError(
|
| 316 |
+
f"A conversation entry has less than 2 messages :\n{source}"
|
| 317 |
+
)
|
| 318 |
|
| 319 |
conv = self._conversation.copy()
|
| 320 |
roles = {"human": conv.roles[0], "gpt": conv.roles[1]}
|