From b8a43e355ba62476c3e963b26d188a5e1f8694e5 Mon Sep 17 00:00:00 2001 From: Jon Durbin Date: Sat, 12 Aug 2023 06:53:42 -0400 Subject: [PATCH] Misc fixes. --- .gitignore | 1 + airoboros/instructors/multiple_choice.py | 2 +- airoboros/instructors/trivia.py | 4 +--- airoboros/self_instruct.py | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 709491e..2cfe23d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +config.yaml chat_cards .DS_Store airoboros*.yaml diff --git a/airoboros/instructors/multiple_choice.py b/airoboros/instructors/multiple_choice.py index 4fc0624..88ebd95 100644 --- a/airoboros/instructors/multiple_choice.py +++ b/airoboros/instructors/multiple_choice.py @@ -83,6 +83,6 @@ def gen_context(_): ): # Let's double check the answer letter/text match. if item["response"].strip() not in item["instruction"]: - logger.warning("Response mismatch: {item['response']}") + logger.warning(f"Response mismatch: {item['response']}") continue yield item diff --git a/airoboros/instructors/trivia.py b/airoboros/instructors/trivia.py index 3283bae..6383418 100644 --- a/airoboros/instructors/trivia.py +++ b/airoboros/instructors/trivia.py @@ -31,7 +31,5 @@ async def generate(instructor, **kwargs): f"Validation failure: {item['instruction']} -- {item['response']}" ) continue - item[ - "system" - ] = "You are a world class trivia bot - generate accurate, succint responses." + item["instruction"] = "trivia: " + item["instruction"] yield item diff --git a/airoboros/self_instruct.py b/airoboros/self_instruct.py index 1d128f6..394b206 100644 --- a/airoboros/self_instruct.py +++ b/airoboros/self_instruct.py @@ -161,7 +161,7 @@ def initialize_index(self): docs = ["__initialize__"] # This is a bit slow. - for doc in docs: + for doc in tqdm(docs): self.index.add( np.array( [ diff --git a/setup.py b/setup.py index 70887b3..3725e33 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name="airoboros", - version="2.0.22", + version="2.0.23", description="Updated and improved implementation of the self-instruct system.", long_description=long_description, long_description_content_type="text/markdown",