Skip to content

Commit

Permalink
tests: fastpath (#17)
Browse files Browse the repository at this point in the history
added fastpath cases for configuration and Flan-T5

fixes respecting model_id into lifecycle hooks.

update CLI to cleanup models info
  • Loading branch information
aarnphm committed Jun 12, 2023
1 parent 187a5f8 commit f8ebb36
Show file tree
Hide file tree
Showing 22 changed files with 767 additions and 279 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ jobs:
- name: Type check
if: ${{ github.event_name == 'pull_request' }}
run: git diff --name-only --diff-filter=AM "origin/$GITHUB_BASE_REF" -z -- '*.py{,i}' | xargs -0 --no-run-if-empty hatch run dev:typing
tests:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
name: tests (${{ matrix.os }}-${{ matrix.python-version }})
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup CI
uses: ./.github/actions/setup-repo
- name: Run tests
run: hatch run test
concurrency:
group: ci-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ dependencies = [
# tabulate for CLI with CJK support
# >=0.9.0 for some bug fixes
"tabulate[widechars]>=0.9.0",
"typing_extensions",
]
description = 'OpenLLM: REST/gRPC API server for running any open Large-Language Model - StableLM, Llama, Alpaca, Dolly, Flan-T5, Custom'
dynamic = ["version"]
Expand Down Expand Up @@ -101,9 +102,16 @@ dependencies = [
"pytest-mock",
"pytest-randomly",
"pytest-rerunfailures",
# NOTE: To run all hooks
"pre-commit",
# NOTE: Using under ./tools/update-optional-dependencies.py
"tomlkit",
# NOTE: Using under ./tools/update-readme.py
"markdown-it-py",
# NOTE: Tests strategies with Hypothesis
"hypothesis",
# NOTE: snapshot testing
"syrupy",
]
[tool.hatch.envs.default.scripts]
cov = ["test-cov", "cov-report"]
Expand Down
5 changes: 5 additions & 0 deletions src/openllm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
from . import utils as utils
from .__about__ import __version__ as __version__
from .exceptions import MissingDependencyError
import logging as _

if utils.DEBUG:
_.basicConfig(level=_.NOTSET)


_import_structure = {
"_llm": ["LLM", "Runner"],
Expand Down
Loading

0 comments on commit f8ebb36

Please sign in to comment.