-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for pip install, rename classes to standardize for requests and…
… responses, restructure tests and begin working to get them passing
- Loading branch information
Showing
48 changed files
with
1,309 additions
and
1,445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
install: | ||
pip install -r requirements.txt | ||
|
||
install-dev: | ||
pip install -e .[dev] | ||
|
||
quality: | ||
ruff check src tests | ||
isort --check-only src tests | ||
flake8 src tests --max-line-length 88 | ||
mypy src | ||
|
||
style: | ||
ruff format src tests | ||
isort src tests | ||
flake8 src tests --max-line-length 88 | ||
|
||
# test: | ||
# pytest tests | ||
|
||
build: | ||
python setup.py sdist bdist_wheel | ||
|
||
clean: | ||
rm -rf __pycache__ | ||
rm -rf build | ||
rm -rf dist | ||
rm -rf *.egg-info | ||
find . -type f -name "*.pyc" -delete | ||
find . -type d -name "__pycache__" -exec rm -r {} + | ||
rm -rf .mypy_cache | ||
rm -rf .pytest_cache | ||
|
||
.PHONY: install install-dev quality style test test-unit test-integration test-e2e test-smoke test-sanity test-regression build clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
line-length = 88 | ||
target-version = ['py38'] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.mypy] | ||
files = "src/guidellm" | ||
|
||
[tool.ruff] | ||
exclude = ["build", "dist", "env", ".venv"] | ||
lint.select = ["E", "F", "W"] | ||
|
||
[tool.flake8] | ||
max-line-length = 88 | ||
|
||
[tool.pytest.ini_options] | ||
markers = [ | ||
"smoke: quick tests to check basic functionality", | ||
"sanity: detailed tests to ensure major functions work correctly", | ||
"regression: tests to ensure that new changes do not break existing functionality" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
from setuptools import setup, find_packages | ||
from typing import Tuple | ||
|
||
|
||
def _setup_long_description() -> Tuple[str, str]: | ||
return open("README.md", "r", encoding="utf-8").read(), "text/markdown" | ||
|
||
|
||
setup( | ||
name='guidellm', | ||
version='0.1.0', | ||
author='Neuralmagic, Inc.', | ||
description='Guidance platform for deploying and managing large language models.', | ||
long_description=_setup_long_description()[0], | ||
long_description_content_type=_setup_long_description()[1], | ||
license="Apache", | ||
url="https://github.com/neuralmagic/guidellm", | ||
packages=find_packages(where='src'), | ||
package_dir={'': 'src'}, | ||
include_package_data=True, | ||
install_requires=[ | ||
'datasets', | ||
'loguru', | ||
'numpy', | ||
'openai', | ||
'requests', | ||
'transformers', | ||
], | ||
extras_require={ | ||
'dev': [ | ||
'pytest', | ||
'sphinx', | ||
'ruff', | ||
'mypy', | ||
'black', | ||
'isort', | ||
'flake8', | ||
'pre-commit', | ||
], | ||
}, | ||
entry_points={ | ||
'console_scripts': [ | ||
'guidellm=guidellm.main:main', | ||
], | ||
}, | ||
python_requires=">=3.8.0", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Education", | ||
"Intended Audience :: Information Technology", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: POSIX :: Linux", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
"Topic :: Software Development", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
from .base import * | ||
from .openai import * | ||
from .base import Backend, BackendTypes, GenerativeResponse | ||
from .openai import OpenAIBackend | ||
|
||
__all__ = [ | ||
"Backend", | ||
"BackendTypes", | ||
"GenerativeResponse", | ||
"OpenAIBackend", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
from .distribution import * | ||
from .request import * | ||
from .result import * | ||
from .distribution import Distribution | ||
from .request import TextGenerationRequest | ||
from .result import ( | ||
RequestConcurrencyMeasurement, | ||
TextGenerationBenchmark, | ||
TextGenerationBenchmarkReport, | ||
TextGenerationError, | ||
TextGenerationResult, | ||
) | ||
|
||
__all__ = [ | ||
"Distribution", | ||
"TextGenerationRequest", | ||
"TextGenerationResult", | ||
"TextGenerationError", | ||
"TextGenerationBenchmark", | ||
"TextGenerationBenchmarkReport", | ||
"RequestConcurrencyMeasurement", | ||
] |
Oops, something went wrong.