Skip to content

Commit

Permalink
feat: upgrade to new fastapi, update models to handle both pydantic v… (
Browse files Browse the repository at this point in the history
kserve#3374)

* feat: add support for pydantic v2, tests for pydantic v1, and update dependencies

Signed-off-by: Timothy Laurent <[email protected]>

* feat: regenerate lock files

Signed-off-by: Timothy Laurent <[email protected]>

* feat: regenerate lock files with updates

Signed-off-by: Timothy Laurent <[email protected]>

* fix: update dependencies, fix broken tests

* feat: add special case for testing model ready, "True" for pydantic v1

* Update poetry lock

Signed-off-by: Dan Sun <[email protected]>

---------

Signed-off-by: Timothy Laurent <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
Co-authored-by: Dan Sun <[email protected]>
Signed-off-by: tjandy98 <[email protected]>
  • Loading branch information
2 people authored and tjandy98 committed Apr 10, 2024
1 parent 1b7d56c commit abb7cb8
Show file tree
Hide file tree
Showing 19 changed files with 2,163 additions and 1,128 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,36 @@ jobs:
source kserve/.venv/bin/activate
pytest --cov=kserve ./kserve
# ----------------------------------------Kserve Pydantic V1 Unit Tests--------------------------------------------
- name: Setup kserve pydantic v1 directory
run: |
mkdir -p python/kserve-pydantic-v1
cp -r python/kserve/* python/kserve-pydantic-v1
cd python/kserve-pydantic-v1
# update the lock file without installing dependencies
poetry update "pydantic<2.0" --lock
- name: Load cached kserve pydantic v1 venv
id: cached-kserve-pydantic-v1-dependencies
uses: actions/cache@v3
with:
path: python/kserve-pydantic-v1/.venv
key: kserve-pydantic-v1-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/kserve-pydantic-v1/poetry.lock') }}
# install kserve pydantic v1 dependencies if cache does not exist
- name: Install kserve pydantic v1 dependencies
if: steps.cached-kserve-pydantic-v1-dependencies.outputs.cache-hit != 'true'
run: |
cd python/kserve-pydantic-v1
make install_dependencies
- name: Install kserve pydantic v1
run: |
cd python/kserve-pydantic-v1
make dev_install
- name: Test kserve pydantic v1
run: |
cd python
source kserve-pydantic-v1/.venv/bin/activate
pytest --cov=kserve ./kserve-pydantic-v1
# ----------------------------------------Sklearn Server Unit Tests------------------------------------------------
# load cached sklearn venv if cache exists
- name: Load cached sklearn venv
Expand Down
199 changes: 135 additions & 64 deletions python/aiffairness/poetry.lock

Large diffs are not rendered by default.

49 changes: 24 additions & 25 deletions python/alibiexplainer/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit abb7cb8

Please sign in to comment.