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: Curtis Maddalozzo <[email protected]>
  • Loading branch information
2 people authored and cmaddalozzo committed Apr 19, 2024
1 parent ac9bf1a commit 2e394ae
Show file tree
Hide file tree
Showing 19 changed files with 10,723 additions and 5,985 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
903 changes: 626 additions & 277 deletions python/aiffairness/poetry.lock

Large diffs are not rendered by default.

2,036 changes: 1,138 additions & 898 deletions python/alibiexplainer/poetry.lock

Large diffs are not rendered by default.

1,244 changes: 759 additions & 485 deletions python/artexplainer/poetry.lock

Large diffs are not rendered by default.

1,006 changes: 633 additions & 373 deletions python/custom_model/poetry.lock

Large diffs are not rendered by default.

953 changes: 649 additions & 304 deletions python/custom_tokenizer/poetry.lock

Large diffs are not rendered by default.

1,006 changes: 633 additions & 373 deletions python/custom_transformer/poetry.lock

Large diffs are not rendered by default.

1,167 changes: 673 additions & 494 deletions python/huggingfaceserver/poetry.lock

Large diffs are not rendered by default.

Loading

0 comments on commit 2e394ae

Please sign in to comment.