Skip to content

Commit

Permalink
build: Upgrade stale packages (fastapi, starlette, tensorflow, torch) (
Browse files Browse the repository at this point in the history
…SeldonIO#1603)

* use py >= 3.9

* update packages

* fix tests due to fastapi `0.109.2`

* upgrade mypy to fix issues after upgrading starlette

* remove py3.8 from CI tests

* add a min version for tritonclient

* regenerate lock file
  • Loading branch information
sakoush committed Mar 1, 2024
1 parent 7ac4351 commit 05d6a0c
Show file tree
Hide file tree
Showing 23 changed files with 11,992 additions and 18,733 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
os: [ubuntu-latest, macos-latest]
# NOTE: There's no pre-built `grpcio` wheel for Python 3.11 yet
# https://github.com/grpc/grpc/issues/32454
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
is-pr:
- ${{ github.event_name == 'pull_request' }}
exclude:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
tox-environment:
- sklearn
- xgboost
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10"]
python-version: [3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Maximize build space
Expand Down
6,137 changes: 3,117 additions & 3,020 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 11 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ asyncio_mode = "auto"
addopts = "--import-mode=importlib"

[tool.poetry.dependencies]
python = "^3.8.1,<3.12"
python = ">=3.9,<3.12"
click = "*"
fastapi = ">=0.88.0,!=0.89.0,<=0.109.2"
python-dotenv = "*"
Expand All @@ -55,14 +55,13 @@ uvicorn = "*"
starlette-exporter = "*"
py-grpc-prometheus = "*"
aiokafka = "*"
## Tritonclient has recently started requiring cuda-python, which doesn't work
## in MacOS.
## Adding a ceiling until this issue gets resolved:
## https://github.com/triton-inference-server/server/issues/6246
tritonclient = {version = ">=2.24,<2.43", extras = ["http"]}
# add a min version to tritonclient due to https://github.com/triton-inference-server/server/issues/6246
tritonclient = ">=2.40"
aiofiles = "*"
orjson = "*"
uvloop = {version = "*", markers = "sys_platform != 'win32' and (sys_platform != 'cygwin' and platform_python_implementation != 'PyPy')"}
pydantic = "<2.0.0"
python-multipart = "*"

## The importlib-resources backport is required to use some
## functionality added in Python 3.10
Expand Down Expand Up @@ -93,7 +92,7 @@ pyyaml = "6.0.1"
conda-pack = "0.7.1"
flake8 = "7.0.0"
flake8-black = "0.3.6"
mypy = "1.5.1"
mypy = "1.8.0"
mypy-protobuf = "3.1.0"
types-protobuf = "4.24.0.20240129"
types-orjson = "3.6.2"
Expand All @@ -106,7 +105,7 @@ filelock = "^3.13.1"

[tool.poetry.group.docker.dependencies]
protobuf = "3.20.3"
tensorflow = "~2.12.0"
tensorflow = "<2.15"

[tool.poetry.group.all-runtimes]
optional = true
Expand All @@ -129,13 +128,13 @@ requests-mock = "~1.11.0"
types-requests = "~2.28.11.5"

## Dev dependencies from Alibi-Detect
tensorflow = "~2.12.0"
tensorflow = "<2.15"

## Dev dependencies from MLflow
torch = "2.0.0"
pytorch-lightning = "2.1.3"
torch = "2.2.1"
pytorch-lightning = "2.2.0.post0"
torchmetrics = "1.3.1"
torchvision = "0.15.1"
torchvision = "0.17.1"
mlflow = "2.10.2"

## Dev dependencies from HuggingFace
Expand Down
3,611 changes: 1,374 additions & 2,237 deletions runtimes/alibi-detect/poetry.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions runtimes/alibi-detect/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ readme = "README.md"
packages = [{include = "mlserver_alibi_detect"}]

[tool.poetry.dependencies]
python = "^3.8.1,<3.12"
python = ">=3.9,<3.12"
mlserver = "*"
alibi-detect = {extras = ["tensorflow"], version = "*"}
pydantic = "<2.0.0"

[tool.poetry.group.dev.dependencies]
mlserver = {path = "../..", develop = true}
tensorflow = ">=2.12,<2.14"
tensorflow = "<2.15"

[build-system]
requires = ["poetry-core"]
Expand Down
3,992 changes: 1,539 additions & 2,453 deletions runtimes/alibi-explain/poetry.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions runtimes/alibi-explain/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ readme = "README.md"
packages = [{include = "mlserver_alibi_explain"}]

[tool.poetry.dependencies]
python = "^3.8.1,<3.12"
python = ">=3.9,<3.12"
mlserver = "*"
mlserver_sklearn = "*"
mlserver_xgboost = "*"
mlserver_lightgbm = "*"
orjson = "*"
alibi = {extras = ["shap", "tensorflow"], version = "*"}
pydantic = "<2.0.0"

[tool.poetry.group.dev.dependencies]
mlserver = {path = "../..", develop = true}
mlserver_sklearn = {path = "../../runtimes/sklearn", develop = true}
mlserver_xgboost = {path = "../../runtimes/xgboost", develop = true}
mlserver_lightgbm = {path = "../../runtimes/lightgbm", develop = true}
tensorflow = "~2.12.0"
tensorflow = "<2.15"
requests-mock = "~1.10.0"
types-requests = "~2.28.11.5"

Expand Down
1,644 changes: 340 additions & 1,304 deletions runtimes/catboost/poetry.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion runtimes/catboost/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ readme = "README.md"
packages = [{include = "mlserver_catboost"}]

[tool.poetry.dependencies]
python = "^3.8.1,<3.12"
python = ">=3.9,<3.12"
catboost = "*"
joblib = "*"
mlserver = "*"
pydantic = "<2.0.0"

[tool.poetry.group.dev.dependencies]
mlserver = {path = "../..", develop = true}
Expand Down
3,251 changes: 1,454 additions & 1,797 deletions runtimes/huggingface/poetry.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions runtimes/huggingface/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ readme = "README.md"
packages = [{include = "mlserver_huggingface"}]

[tool.poetry.dependencies]
python = "^3.8.1,<3.12"
python = ">=3.9,<3.12"
mlserver = "*"
tensorflow = "*"
pillow = "*"
optimum = {extras = ["onnxruntime"], version = ">=1.4,<2.0"}
pydantic = "<2.0.0"

[tool.poetry.group.dev.dependencies]
mlserver = {path = "../..", develop = true}
torch = "2.1.2"
torch = "2.2.1"
transformers = ">=4.30,<5.0"
tensorflow = ">=2.12,<2.14"
tensorflow = ">=2.12,<2.15"

[build-system]
requires = ["poetry-core"]
Expand Down
Loading

0 comments on commit 05d6a0c

Please sign in to comment.