Skip to content

Commit c388799

Browse files
committed
alibi-explain-server component compatibility with python 3.12: tests pass, dockerfile builds
1 parent 03fa590 commit c388799

File tree

15 files changed

+5150
-4946
lines changed

15 files changed

+5150
-4946
lines changed

components/alibi-detect-server/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[tool.poetry]
22
name = "adserver"
3-
version = "1.18.0"
3+
version = "1.19.0-dev"
44
description = "Model Explanation Server"
55
authors = ["Seldon Technologies Ltd. <[email protected]>"]
66
license = "Business Source License 1.1"
77

88
[tool.poetry.dependencies]
9-
python = ">=3.8,<3.11"
9+
python = ">=3.12, <3.13.0"
1010
alibi-detect = {version = "^0.11.4", extras = ["all"]}
1111
seldon-core = {path = "_seldon_core", develop = false}
1212
numpy = "*"
1313
cloudevents = "1.2.0"
14-
tensorflow = "^2.12.0"
15-
scikit-learn = "0.24.2"
14+
tensorflow = "2.17.1"
15+
scikit-learn = "1.7.2"
1616

1717
elasticsearch = "7.9.1"
1818

components/alibi-explain-server/Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,18 @@ WORKDIR /microservice
2323

2424
# Install Poetry
2525
ENV POETRY_HOME /microservice/.poetry
26-
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.1.15
26+
RUN curl -sSL https://install.python-poetry.org | python3 - --version 2.1.2
2727

2828
ENV PATH "$POETRY_HOME/bin:$PATH"
2929
ENV POETRY_VIRTUALENVS_CREATE false
3030

31-
# Install the server
31+
# Install the dependencies only
3232
COPY poetry.lock pyproject.toml ./
3333
## Disable Poetry's new installer to avoid JSONDecodeError
3434
## https://github.com/python-poetry/poetry/issues/4210
3535
## NOTE: Removing explicitly requirements.txt file from subdeps test
3636
## dependencies causing false positives in Snyk.
37-
RUN poetry config experimental.new-installer false && \
38-
poetry install && \
39-
rm ~/.cache/pip -rf && \
40-
rm -f /opt/conda/lib/python3.8/site-packages/gslib/vendored/boto/requirements.txt \
41-
/opt/conda/lib/python3.8/site-packages/gslib/vendored/oauth2client/docs/requirements.txt \
42-
/opt/conda/lib/python3.8/site-packages/spacy/tests/package/requirements.txt
37+
RUN poetry install --no-root
4338

4439

4540
# Add licences
@@ -56,6 +51,9 @@ RUN python -m spacy download en_core_web_md
5651
COPY alibiexplainer alibiexplainer
5752
COPY README.md README.md
5853

54+
# Install the project code
55+
RUN poetry install
56+
5957
FROM base as final
6058
WORKDIR /microservice
6159

components/alibi-explain-server/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SHELL := /bin/bash
44
VERSION ?= $(shell cat ../../version.txt)
55
DOCKER_REGISTRY ?= seldonio
66

7-
BASE_IMAGE ?= ${DOCKER_REGISTRY}/conda-ubi8
7+
BASE_IMAGE ?= ${DOCKER_REGISTRY}/conda-ubi9
88
IMAGE ?= ${DOCKER_REGISTRY}/alibiexplainer
99
KIND_NAME ?= kind
1010

components/alibi-explain-server/alibiexplainer/proto/prediction_pb2.py

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

0 commit comments

Comments
 (0)