Skip to content

Commit e87943a

Browse files
shivakrishnaahSherif Akoushdependabot[bot]
authored
Added dependency upgrades for python3.12 support (#1951)
* Python3.12 changes * Added the python3.12 version * Code changes for the inner pyproject.toml * Fixes for the scikit-learn * Added the missign git repository url * Added the custom github repo url * Added the gcc linux as well * Added the new gcc environment as well * Upgraded the alibi-detct to remove creme dependency * Added alibi as well to the restriction * Commiting the changes for the gcc and alibi * Changes for the scikit-learn * #1951 resolved the comments and rebased with master * #1951 reverted the code to address the comments * #1951 Fixed the issues * #1951 Rebased with master and addressed the comments for python3.12 upgrade * #1951 Upgraded the tensorflow for compatibility with python version * update alibi libraries TF versions * add min torch and tf versions for python 3.12 support * update torch min version in mlflow runtime to support python 2.12 * update lockfiles by running `make lock` * Updated the Mlserver version to 1.6.1 * Update tests.yml * Revert the version changes testing * Updated the lock files using make lock command * build(deps): bump mlflow from 2.17.2 to 2.18.0 in /runtimes/mlflow (#1970) Bumps [mlflow](https://github.com/mlflow/mlflow) from 2.17.2 to 2.18.0. - [Release notes](https://github.com/mlflow/mlflow/releases) - [Changelog](https://github.com/mlflow/mlflow/blob/master/CHANGELOG.md) - [Commits](mlflow/mlflow@v2.17.2...v2.18.0) --- updated-dependencies: - dependency-name: mlflow dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Python3.12 changes * Added the python3.12 version * Code changes for the inner pyproject.toml * Fixes for the scikit-learn * Added the missign git repository url * Added the custom github repo url * Added the gcc linux as well * Added the new gcc environment as well * Upgraded the alibi-detct to remove creme dependency * Added alibi as well to the restriction * Commiting the changes for the gcc and alibi * Changes for the scikit-learn * #1951 Rebased with master and addressed the comments for python3.12 upgrade * #1951 Upgraded the tensorflow for compatibility with python version * update alibi libraries TF versions * add min torch and tf versions for python 3.12 support * update torch min version in mlflow runtime to support python 2.12 * update lockfiles by running `make lock` * Updated the Mlserver version to 1.6.1 * Update tests.yml * Revert the version changes testing * Updated the lock files using make lock command * upgrade alibi libraries to point to master * upgrade tf version as dev deps * update lock files * update lock * add tests for py3.11 and py3.12 * generate grpc protos * add tf-keras dep * update lockfile for hf runtime * revert back mlflow deps list * use legacy keras in alibi-detect / alibi-explain tests * Add docs about supported python versions * adjust test to use python 3.10 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Sherif Akoush <sa@seldon.io> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 5fb0c8f commit e87943a

34 files changed

+4516
-3946
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: ["3.9", "3.10"]
16+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1717
target: ["dataplane", "model-repository"]
1818
runs-on: ubuntu-22.04
1919
steps:
@@ -36,9 +36,7 @@ jobs:
3636
lint:
3737
strategy:
3838
matrix:
39-
python-version:
40-
- "3.9"
41-
- "3.10"
39+
python-version: ["3.9", "3.10", "3.11", "3.12"]
4240
runs-on: ubuntu-22.04
4341
steps:
4442
- uses: actions/checkout@v4
@@ -64,9 +62,7 @@ jobs:
6462
- macos-13
6563
# NOTE: There's no pre-built `grpcio` wheel for Python 3.11 yet
6664
# https://github.com/grpc/grpc/issues/32454
67-
python-version:
68-
- "3.9"
69-
- "3.10"
65+
python-version: ["3.9", "3.10", "3.11", "3.12"]
7066
is-pr:
7167
- ${{ github.event_name == 'pull_request' }}
7268
exclude:
@@ -111,9 +107,7 @@ jobs:
111107
os:
112108
- ubuntu-22.04
113109
- macos-13
114-
python-version:
115-
- "3.9"
116-
- "3.10"
110+
python-version: ["3.9", "3.10", "3.11", "3.12"]
117111
tox-environment:
118112
- sklearn
119113
- xgboost
@@ -166,9 +160,7 @@ jobs:
166160
os:
167161
- ubuntu-22.04
168162
- macos-12
169-
python-version:
170-
- "3.9"
171-
- "3.10"
163+
python-version: ["3.9", "3.10", "3.11", "3.12"]
172164
runs-on: ${{ matrix.os }}
173165
steps:
174166
- name: Maximize build space

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ MLServer is licensed under the Apache License, Version 2.0. However please note
100100
| 3.8 | 🔴 |
101101
| 3.9 | 🟢 |
102102
| 3.10 | 🟢 |
103-
| 3.11 | 🔵 |
104-
| 3.12 | 🔵 |
103+
| 3.11 | 🟢 |
104+
| 3.12 | 🟢 |
105+
| 3.13 | 🔴 |
105106

106107
## Examples
107108

docs-gb/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ Out of the box, MLServer provides support for:
9898
| 3.8 | 🔴 |
9999
| 3.9 | 🟢 |
100100
| 3.10 | 🟢 |
101-
| 3.11 | 🔵 |
102-
| 3.12 | 🔵 |
101+
| 3.11 | 🟢 |
102+
| 3.12 | 🟢 |
103+
| 3.13 | 🔴 |
103104

104105
## Examples
105106

mlserver/grpc/dataplane_pb2.py

Lines changed: 23 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mlserver/grpc/dataplane_pb2_grpc.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4+
import warnings
45

56
from . import dataplane_pb2 as dataplane__pb2
67

8+
GRPC_GENERATED_VERSION = "1.67.1"
9+
GRPC_VERSION = grpc.__version__
10+
_version_not_supported = False
11+
12+
try:
13+
from grpc._utilities import first_version_is_lower
14+
15+
_version_not_supported = first_version_is_lower(
16+
GRPC_VERSION, GRPC_GENERATED_VERSION
17+
)
18+
except ImportError:
19+
_version_not_supported = True
20+
21+
if _version_not_supported:
22+
raise RuntimeError(
23+
f"The grpc package installed is at version {GRPC_VERSION},"
24+
+ f" but the generated code in dataplane_pb2_grpc.py depends on"
25+
+ f" grpcio>={GRPC_GENERATED_VERSION}."
26+
+ f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
27+
+ f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
28+
)
29+
730

831
class GRPCInferenceServiceStub(object):
932
"""
@@ -21,51 +44,61 @@ def __init__(self, channel):
2144
"/inference.GRPCInferenceService/ServerLive",
2245
request_serializer=dataplane__pb2.ServerLiveRequest.SerializeToString,
2346
response_deserializer=dataplane__pb2.ServerLiveResponse.FromString,
47+
_registered_method=True,
2448
)
2549
self.ServerReady = channel.unary_unary(
2650
"/inference.GRPCInferenceService/ServerReady",
2751
request_serializer=dataplane__pb2.ServerReadyRequest.SerializeToString,
2852
response_deserializer=dataplane__pb2.ServerReadyResponse.FromString,
53+
_registered_method=True,
2954
)
3055
self.ModelReady = channel.unary_unary(
3156
"/inference.GRPCInferenceService/ModelReady",
3257
request_serializer=dataplane__pb2.ModelReadyRequest.SerializeToString,
3358
response_deserializer=dataplane__pb2.ModelReadyResponse.FromString,
59+
_registered_method=True,
3460
)
3561
self.ServerMetadata = channel.unary_unary(
3662
"/inference.GRPCInferenceService/ServerMetadata",
3763
request_serializer=dataplane__pb2.ServerMetadataRequest.SerializeToString,
3864
response_deserializer=dataplane__pb2.ServerMetadataResponse.FromString,
65+
_registered_method=True,
3966
)
4067
self.ModelMetadata = channel.unary_unary(
4168
"/inference.GRPCInferenceService/ModelMetadata",
4269
request_serializer=dataplane__pb2.ModelMetadataRequest.SerializeToString,
4370
response_deserializer=dataplane__pb2.ModelMetadataResponse.FromString,
71+
_registered_method=True,
4472
)
4573
self.ModelInfer = channel.unary_unary(
4674
"/inference.GRPCInferenceService/ModelInfer",
4775
request_serializer=dataplane__pb2.ModelInferRequest.SerializeToString,
4876
response_deserializer=dataplane__pb2.ModelInferResponse.FromString,
77+
_registered_method=True,
4978
)
5079
self.ModelStreamInfer = channel.stream_stream(
5180
"/inference.GRPCInferenceService/ModelStreamInfer",
5281
request_serializer=dataplane__pb2.ModelInferRequest.SerializeToString,
5382
response_deserializer=dataplane__pb2.ModelInferResponse.FromString,
83+
_registered_method=True,
5484
)
5585
self.RepositoryIndex = channel.unary_unary(
5686
"/inference.GRPCInferenceService/RepositoryIndex",
5787
request_serializer=dataplane__pb2.RepositoryIndexRequest.SerializeToString,
5888
response_deserializer=dataplane__pb2.RepositoryIndexResponse.FromString,
89+
_registered_method=True,
5990
)
6091
self.RepositoryModelLoad = channel.unary_unary(
6192
"/inference.GRPCInferenceService/RepositoryModelLoad",
6293
request_serializer=dataplane__pb2.RepositoryModelLoadRequest.SerializeToString,
6394
response_deserializer=dataplane__pb2.RepositoryModelLoadResponse.FromString,
95+
_registered_method=True,
6496
)
6597
self.RepositoryModelUnload = channel.unary_unary(
6698
"/inference.GRPCInferenceService/RepositoryModelUnload",
6799
request_serializer=dataplane__pb2.RepositoryModelUnloadRequest.SerializeToString,
68100
response_deserializer=dataplane__pb2.RepositoryModelUnloadResponse.FromString,
101+
_registered_method=True,
69102
)
70103

71104

@@ -193,6 +226,9 @@ def add_GRPCInferenceServiceServicer_to_server(servicer, server):
193226
"inference.GRPCInferenceService", rpc_method_handlers
194227
)
195228
server.add_generic_rpc_handlers((generic_handler,))
229+
server.add_registered_method_handlers(
230+
"inference.GRPCInferenceService", rpc_method_handlers
231+
)
196232

197233

198234
# This class is part of an EXPERIMENTAL API.
@@ -229,6 +265,7 @@ def ServerLive(
229265
wait_for_ready,
230266
timeout,
231267
metadata,
268+
_registered_method=True,
232269
)
233270

234271
@staticmethod
@@ -258,6 +295,7 @@ def ServerReady(
258295
wait_for_ready,
259296
timeout,
260297
metadata,
298+
_registered_method=True,
261299
)
262300

263301
@staticmethod
@@ -287,6 +325,7 @@ def ModelReady(
287325
wait_for_ready,
288326
timeout,
289327
metadata,
328+
_registered_method=True,
290329
)
291330

292331
@staticmethod
@@ -316,6 +355,7 @@ def ServerMetadata(
316355
wait_for_ready,
317356
timeout,
318357
metadata,
358+
_registered_method=True,
319359
)
320360

321361
@staticmethod
@@ -345,6 +385,7 @@ def ModelMetadata(
345385
wait_for_ready,
346386
timeout,
347387
metadata,
388+
_registered_method=True,
348389
)
349390

350391
@staticmethod
@@ -374,6 +415,7 @@ def ModelInfer(
374415
wait_for_ready,
375416
timeout,
376417
metadata,
418+
_registered_method=True,
377419
)
378420

379421
@staticmethod
@@ -403,6 +445,7 @@ def ModelStreamInfer(
403445
wait_for_ready,
404446
timeout,
405447
metadata,
448+
_registered_method=True,
406449
)
407450

408451
@staticmethod
@@ -432,6 +475,7 @@ def RepositoryIndex(
432475
wait_for_ready,
433476
timeout,
434477
metadata,
478+
_registered_method=True,
435479
)
436480

437481
@staticmethod
@@ -461,6 +505,7 @@ def RepositoryModelLoad(
461505
wait_for_ready,
462506
timeout,
463507
metadata,
508+
_registered_method=True,
464509
)
465510

466511
@staticmethod
@@ -490,4 +535,5 @@ def RepositoryModelUnload(
490535
wait_for_ready,
491536
timeout,
492537
metadata,
538+
_registered_method=True,
493539
)

mlserver/grpc/model_repository_pb2.py

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)