Skip to content

Commit 24d882b

Browse files
Add python 3.12 support and remove python 3.8 support (kserve#3645)
* Support python 3.12 Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Update dependencies Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Update deps to support 3.12 Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Remove python 3.8 support Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Remove skip for infer client test Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Fix port forward Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Fix sklearn pandas dep Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * skip pydantic v1 test for py 3.12 Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Add setuptools dep for pmml Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Fix lgb Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Include setuptools for paddle Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Include setuptools for huggingface Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Rebase Signed-off-by: Sivanantham Chinnaiyan <[email protected]> * Rebase Signed-off-by: Sivanantham Chinnaiyan <[email protected]> --------- Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
1 parent ecc3729 commit 24d882b

File tree

31 files changed

+10553
-8298
lines changed

31 files changed

+10553
-8298
lines changed

.github/workflows/python-test.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
strategy:
4242
matrix:
43-
python-version: ["3.8", "3.9", "3.10", "3.11"]
43+
python-version: ["3.9", "3.10", "3.11", "3.12"]
4444
steps:
4545
- name: Checkout source
4646
uses: actions/checkout@v4
@@ -98,29 +98,33 @@ jobs:
9898
9999
# ----------------------------------------Kserve Pydantic V1 Unit Tests--------------------------------------------
100100
- name: Setup kserve pydantic v1 directory
101+
if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') }}
101102
run: |
102103
mkdir -p python/kserve-pydantic-v1
103104
cp -r python/kserve/* python/kserve-pydantic-v1
104105
cd python/kserve-pydantic-v1
105106
# update the lock file without installing dependencies
106107
poetry update "pydantic<2.0" --lock
107108
- name: Load cached kserve pydantic v1 venv
109+
if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') }}
108110
id: cached-kserve-pydantic-v1-dependencies
109111
uses: actions/cache@v3
110112
with:
111113
path: python/kserve-pydantic-v1/.venv
112114
key: kserve-pydantic-v1-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/kserve-pydantic-v1/poetry.lock') }}
113115
# install kserve pydantic v1 dependencies if cache does not exist
114116
- name: Install kserve pydantic v1 dependencies
115-
if: steps.cached-kserve-pydantic-v1-dependencies.outputs.cache-hit != 'true'
117+
if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') && steps.cached-kserve-pydantic-v1-dependencies.outputs.cache-hit != 'true' }}
116118
run: |
117119
cd python/kserve-pydantic-v1
118120
make install_dependencies
119121
- name: Install kserve pydantic v1
122+
if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') }}
120123
run: |
121124
cd python/kserve-pydantic-v1
122125
make dev_install
123126
- name: Test kserve pydantic v1
127+
if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') }}
124128
run: |
125129
cd python
126130
source kserve-pydantic-v1/.venv/bin/activate
@@ -250,33 +254,28 @@ jobs:
250254
# ----------------------------------------Huggingface Server Unit Tests------------------------------------------------
251255
# load cached huggingface venv if cache exists
252256
- name: Load cached huggingface venv
253-
if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }}
254257
id: huggingface-dependencies
255258
uses: actions/cache@v4
256259
with:
257260
path: /mnt/python/huggingfaceserver-venv
258261
key: huggingface-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/kserve/poetry.lock', '**/huggingfaceserver/poetry.lock') }}
259262
# install huggingface server dependencies if cache does not exist
260263
- name: Configure poetry for huggingface server
261-
if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }}
262264
run: |
263265
poetry config virtualenvs.path /mnt/python/huggingfaceserver-venv
264266
poetry config virtualenvs.in-project false
265267
- name: Install huggingface dependencies
266-
if: ${{ steps.cached-huggingface-dependencies.outputs.cache-hit != 'true' && !startsWith(steps.setup-python.outputs.python-version, '3.8') }}
267268
run: |
268269
sudo mkdir -p /mnt/python/huggingfaceserver-venv
269270
# change permission so that poetry can install without sudo
270271
sudo chown -R $USER /mnt/python/huggingfaceserver-venv
271272
cd python/huggingfaceserver
272273
make install_dependencies
273274
- name: Install huggingface server
274-
if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }}
275275
run: |
276276
cd python/huggingfaceserver
277277
make dev_install
278278
- name: Test huggingfaceserver
279-
if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }}
280279
run: |
281280
cd python/huggingfaceserver
282281
poetry run -- pytest --cov=huggingfaceserver -vv

python/aiffairness/poetry.lock

+1,265-667
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/aiffairness/pyproject.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ packages = [
1111
]
1212

1313
[tool.poetry.dependencies]
14-
python = ">=3.8,<3.12"
14+
python = ">=3.9,<3.13"
1515
kserve = {path = "../kserve", develop = true}
16-
aif360 = "^0.2.3"
17-
nest-asyncio = "^1.4.0"
16+
aif360 = "^0.6.1"
17+
nest-asyncio = "^1.5.8"
1818
requests = {version = "^2.24.0", extras = ["security"]}
1919

2020
[tool.poetry.group.test]
2121
optional = true
2222

2323
[tool.poetry.group.test.dependencies]
24-
pytest = "^7.2.0"
25-
pytest-cov = "^4.0.0"
24+
pytest = "^7.4.4"
25+
pytest-cov = "^5.0.0"
2626
mypy = "^0.991"
2727

2828
[tool.poetry.group.dev]

python/artexplainer/poetry.lock

+785-664
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/artexplainer/pyproject.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ packages = [
1010
]
1111

1212
[tool.poetry.dependencies]
13-
python = ">=3.9,<3.12"
13+
python = ">=3.9,<3.13"
1414
kserve = {path = "../kserve", develop = true}
15-
adversarial-robustness-toolbox = {version = "^1.10.3", extras = ["keras"]}
16-
nest-asyncio = "^1.4.0"
15+
adversarial-robustness-toolbox = {version = "^1.18.1", extras = ["keras"]}
16+
nest-asyncio = "^1.5.8"
1717
pillow = "^10.3.0"
1818
# pin to avoid https://github.com/kserve/kserve/actions/runs/8990775750/job/24696874468?pr=3598
1919
h5py = "3.10.0"
@@ -22,8 +22,8 @@ h5py = "3.10.0"
2222
optional = true
2323

2424
[tool.poetry.group.test.dependencies]
25-
pytest = "^7.2.0"
26-
pytest-cov = "^4.0.0"
25+
pytest = "^7.4.4"
26+
pytest-cov = "^5.0.0"
2727
mypy = "^0.991"
2828

2929
[tool.poetry.group.dev]

0 commit comments

Comments
 (0)