From 63fdb5a7fbe4197122f39f7e39393411deba1ffe Mon Sep 17 00:00:00 2001 From: florian peyron Date: Mon, 14 Aug 2023 10:40:40 +0200 Subject: [PATCH] Error msg for sharegpt if conv has less than 2 msg (#379) --- src/axolotl/prompters.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/axolotl/prompters.py b/src/axolotl/prompters.py index 216283582..ed79b0f5d 100644 --- a/src/axolotl/prompters.py +++ b/src/axolotl/prompters.py @@ -312,7 +312,9 @@ class ShareGPTPrompter: # pylint: disable=too-few-public-methods if len(source) < 2: # If there isn't a back and forth conversation, ignore it # also happens on the data splitting leaving empty conversations - raise IndexError + raise IndexError( + f"A conversation entry has less than 2 messages :\n{source}" + ) conv = self._conversation.copy() roles = {"human": conv.roles[0], "gpt": conv.roles[1]}