Skip to content

Commit

Permalink
fix ci (#2)
Browse files Browse the repository at this point in the history
* fix ci

* fix ci

* update ci

* update
  • Loading branch information
aniketmaurya committed Dec 6, 2023
1 parent 1862e93 commit ccddbd7
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ jobs:

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ repos:
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: check-docstring-first
- id: check-toml
- id: check-case-conflict
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ plugins:
show_source: false

extra:
homepage: https://TEMPLATE_URL
homepage: https://github.com/aniketmaurya/fastserve

nav:
- Introduction: 'index.md'
Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.ruff]
extend-include = ["*.ipynb"]

[tool.ruff.lint]
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# isort
"I001"
]
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
name = fastserve
version = attr: fastserve.__version__
author = Aniket Maurya
author_email = AUTHOR_EMAIL
description = Package description
author_email = theaniketmaurya@gmail.com
description = 'Machine Learning Serving focused on GenAI & LLMs with simplicity as the top priority.'
description-file = README.md
long_description = file: README.md, LICENSE.md
long_description_content_type = text/markdown
url = package_url
url = https://github.com/aniketmaurya/fastserve
license = Apache License 2.0
keywords = opensource, python

Expand Down
1 change: 0 additions & 1 deletion src/benchmarks/locustfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ def hello_world(self):
"prompt": "An astronaut riding a green horse",
"negative_prompt": "ugly, blurry, poor quality",
}
base_url = self.client.base_url
response = self.client.post("/endpoint", headers=headers, json=data)
response.raise_for_status()
1 change: 0 additions & 1 deletion src/fastserve/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"""A Python Project"""
from .base_fastserve import BaseRequest, FastServe

__version__ = "0.0.1"
8 changes: 7 additions & 1 deletion src/fastserve/batching.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ def get(self, timeout: float = None) -> Any:
return self.result

def __repr__(self) -> str:
return f"WaitedOjb({dict(item=self.item, completed=self.completed, result=self.result, completion_time=self.completion_time)})"
d = dict(
item=self.item,
completed=self.completed,
result=self.result,
completion_time=self.completion_time,
)
return f"WaitedOjb({d})"


class BatchProcessor:
Expand Down
3 changes: 0 additions & 3 deletions src/fastserve/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from .llama_cpp import ServeLlamaCpp
from .sdxl_turbo import ServeSDXLTurbo
from .ssd import ServeSSD1B
8 changes: 5 additions & 3 deletions tests/test_batching.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import random

from fastserve.batching import BatchProcessor


def fake_ml_api(X):
n = len(X)
# print(f"{n} items")
for i in range(1000):
for j in range(1000):
for k in range(50):
l = i / 1000 * j / 1000
return [x + l for x in X]
pass

return [x * random.randint(0, 10) for x in X]


def test_batch_processor():
Expand Down

0 comments on commit ccddbd7

Please sign in to comment.