Skip to content

Commit

Permalink
Misc fixes/missing instructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
j-durbin committed Jul 18, 2023
1 parent 813f4dd commit 59a8d39
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions airoboros/instructors/agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from airoboros.instructors.inline_qa import generate as generate_inline


async def generate(instructor):
"""Generator for agent/router training data."""
async for item in generate_inline(instructor, "agent", start_key="PROMPT"):
yield item
7 changes: 7 additions & 0 deletions airoboros/instructors/cot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from airoboros.instructors.inline_qa import generate as generate_inline


async def generate(instructor):
"""Generator for chain-of-thought training data."""
async for item in generate_inline(instructor, "cot"):
yield item
2 changes: 1 addition & 1 deletion airoboros/self_instruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ async def _post(self, path: str, payload: Dict[str, Any]) -> Dict[str, Any]:
logger.debug(f"token usage: {self.used_tokens}")
return result

async def _post_no_exc(self, *a, **k) -> Dict[str, Any] | None:
async def _post_no_exc(self, *a, **k):
"""Post, ignoring all exceptions."""
try:
return await self._post(*a, **k)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="airoboros",
version="2.0.0",
version="2.0.1",
description="Updated and improved implementation of the self-instruct system.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 59a8d39

Please sign in to comment.