Skip to content

Commit

Permalink
Merge pull request #27 from homanp/introduce-library
Browse files Browse the repository at this point in the history
Remove `FastAPI` and setup package
  • Loading branch information
homanp authored Oct 12, 2023
2 parents 4dfc7e8 + 39ca546 commit 7fce91b
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 290 deletions.
19 changes: 0 additions & 19 deletions .dockerignore

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ superenv/
.DS_Store
venv/
/.vscode
/.codesandbox
/.codesandbox
.pypirc
31 changes: 0 additions & 31 deletions Dockerfile

This file was deleted.

Binary file added dist/nagato_ai-0.0.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/nagato_ai-0.0.1.tar.gz
Binary file not shown.
19 changes: 19 additions & 0 deletions lib/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import asyncio

from lib.models.ingest import IngestRequest
from lib.service.flows import create_finetune


async def ingest(payload: IngestRequest):
"""Ingest data into pipeline"""

async def run_training_flow():
try:
await create_finetune(
payload=payload,
)
except Exception as flow_exception:
raise flow_exception

asyncio.create_task(run_training_flow())
return {"success": True}
28 changes: 0 additions & 28 deletions lib/api/ingest.py

This file was deleted.

13 changes: 0 additions & 13 deletions lib/api/invoke.py

This file was deleted.

58 changes: 0 additions & 58 deletions lib/main.py

This file was deleted.

10 changes: 0 additions & 10 deletions lib/routers.py

This file was deleted.

File renamed without changes.
150 changes: 22 additions & 128 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "nagato"
name = "nagato-ai"
version = "0.0.1"
description = ""
authors = ["Ismail Pelaseyed"]
Expand All @@ -8,7 +8,6 @@ packages = [{include = "lib"}]

[tool.poetry.dependencies]
python = "^3.9"
fastapi = {extras = ["all"], version = "^0.95.1"}
uvicorn = {extras = ["standard"], version = "^0.22.0"}
gunicorn = "^20.1.0"
python-decouple = "^3.8"
Expand All @@ -29,6 +28,7 @@ pypdf = "^3.16.2"
tiktoken = "^0.5.1"
sentence-transformers = "^2.2.2"
replicate = "^0.15.4"
wheel = "^0.41.2"

[build-system]
requires = ["poetry-core"]
Expand Down
17 changes: 17 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from setuptools import find_packages, setup

setup(
name="nagato-ai",
version="0.0.1",
packages=find_packages(),
description="The open framework for finetuning LLMs on private data",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="Ismail Pelaseyed",
author_email="ismail@superagent.sh",
url="https://github.com/homanp/nagato",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
],
)

0 comments on commit 7fce91b

Please sign in to comment.