Files
Andrews ArokiamandGitHub a938000cd1 Dependency resolver using poetry (#2602)
* Intial process of moving dependency management to poetry

Signed-off-by: Andrews Arokiam <[email protected]>

update test dependencies

Signed-off-by: Andrews Arokiam <[email protected]>

Add strict dependency versions

Signed-off-by: Andrews Arokiam <[email protected]>

Remove setup.py and requirements.txt in python sdk

Signed-off-by: Andrews Arokiam <[email protected]>

* Add toml and lock file and remove setup.py for aiffairness

Signed-off-by: Andrews Arokiam <[email protected]>

Add toml and lock file and remove setup.py for aixexplainer

Signed-off-by: Andrews Arokiam <[email protected]>

Update readme of kserve sdk

Signed-off-by: Andrews Arokiam <[email protected]>

Add toml and lock file and remove setup.py for alibiexplainer

Signed-off-by: Andrews Arokiam <[email protected]>

Add packages in toml file for alibi and aix explainers

Signed-off-by: Andrews Arokiam <[email protected]>

Add toml and lock file and remove setup.py for artexplainer

Signed-off-by: Andrews Arokiam <[email protected]>

Add toml and lock file and remove setup.py for lgbserver

Signed-off-by: Andrews Arokiam <[email protected]>

* Add toml and lock file and remove setup.py for paddleserver

Signed-off-by: Andrews Arokiam <[email protected]>

Add toml and lock file and remove setup.py for pmmlserver

Signed-off-by: Andrews Arokiam <[email protected]>

Add toml and lock file and remove setup.py for sklearn server

Signed-off-by: Andrews Arokiam <[email protected]>

Add toml and lock file and remove setup.py for xgbserver

Signed-off-by: Andrews Arokiam <[email protected]>

update author name in aliibi explainer

Signed-off-by: Andrews Arokiam <[email protected]>

loosen pinned dependencies to allow patch level updates

Signed-off-by: Andrews Arokiam <[email protected]>

Add toml and lock file for custom model

Signed-off-by: Andrews Arokiam <[email protected]>

Add toml and lock file and remove setup.py for custom transformer

Signed-off-by: Andrews Arokiam <[email protected]>

Update readme

Signed-off-by: Andrews Arokiam <[email protected]>

* Bump joblib version to 1.0.0 in sklearn server

Signed-off-by: Andrews Arokiam <[email protected]>

Add constraint for numpy <1.24.0

Signed-off-by: Andrews Arokiam <[email protected]>

Update python constraint >=3.7 for aixexplainer

Signed-off-by: Andrews Arokiam <[email protected]>

Bump joblib version to 1.2 in alibi

Signed-off-by: Andrews Arokiam <[email protected]>

Add docker build and push rules in makefile for art explainer and aiffairness

Signed-off-by: Andrews Arokiam <[email protected]>

Add missing dependency pillow to art explainer

Signed-off-by: Andrews Arokiam <[email protected]>

Update python Dockerfiles to use poetry

Signed-off-by: Andrews Arokiam <[email protected]>

Bump kserve version to 0.10.0

Signed-off-by: Andrews Arokiam <[email protected]>

Update python unit test workflow

Signed-off-by: Andrews Arokiam <[email protected]>

Update python sdk publish workflow

Signed-off-by: Andrews Arokiam <[email protected]>

Update e2e test gh-actions

Signed-off-by: Andrews Arokiam <[email protected]>

fix e2e test workflow

Signed-off-by: Andrews Arokiam <[email protected]>

revert kserve version to 0.10.0rc1

Signed-off-by: Andrews Arokiam <[email protected]>

update qpext e2e test script

Signed-off-by: Andrews Arokiam <[email protected]>

fix sklearn workflow step name

Signed-off-by: Andrews Arokiam <[email protected]>

update authors for kserve sdk

Signed-off-by: Andrews Arokiam <[email protected]>

update custom transformer description

Signed-off-by: Andrews Arokiam <[email protected]>

update helm test workflow to use poetry

Signed-off-by: Andrews Arokiam <[email protected]>

add constraint fastapi <=0.88.0

Signed-off-by: Andrews Arokiam <[email protected]>

Add script for updating release version in toml files

Signed-off-by: Andrews Arokiam <[email protected]>

Add separate job for py 3.7 build unit test

Signed-off-by: Andrews Arokiam <[email protected]>

Add pytest-cov dependency

Signed-off-by: Andrews Arokiam <[email protected]>

* Fix missing dependency and update lock file

Signed-off-by: Andrews Arokiam <[email protected]>

Fix alibi explainer dependency errors

Signed-off-by: Andrews Arokiam <[email protected]>

Update version of kserve in all packages

Signed-off-by: Andrews Arokiam <[email protected]>

Add missing triton client

Signed-off-by: Andrews Arokiam <[email protected]>

Loosen protobuf and numpy dependency and replace table logger with tabulate

Signed-off-by: Andrews Arokiam <[email protected]>

Bump pillow from 9.0.1 to 9.3.0 in /python/custom_transformer

Signed-off-by: Andrews Arokiam <[email protected]>

* update release version to 0.10.1

Signed-off-by: Andrews Arokiam <[email protected]>

upgrade poetry to 1.4.0

Signed-off-by: Andrews Arokiam <[email protected]>

fix custom model

Signed-off-by: Andrews Arokiam <[email protected]>

resolve conflicts with making storage as optional dependency

Signed-off-by: Andrews Arokiam <[email protected]>

fix kserve sdk unit test

Signed-off-by: Andrews Arokiam <[email protected]>

fix alibi explainer build failure

Signed-off-by: Andrews Arokiam <[email protected]>

improve dockerfiles by introducing parameters

Signed-off-by: Andrews Arokiam <[email protected]>

Remove obsolete requirements and setup.py

Signed-off-by: Andrews Arokiam <[email protected]>

fix python test workflow

Signed-off-by: Andrews Arokiam <[email protected]>

fix aixexplainer build failure

Signed-off-by: Andrews Arokiam <[email protected]>

fix paddle server test failure

Signed-off-by: Andrews Arokiam <[email protected]>

upgrade torchvision to 0.15.1 in custom model

Signed-off-by: Andrews Arokiam <[email protected]>

Prune explainer dangling explainer images to free up space

Signed-off-by: Andrews Arokiam <[email protected]>

* Increase timeout for test-fast and test-slow

test-fast and test-slow were failing with timeout and the timeout has
been increased

Signed-off-by: Andrews Arokiam <[email protected]>

* Remove numpy in art explainer

Remove numpy dependency in art explainer as kserve already specifies the dependency

Signed-off-by: Andrews Arokiam <[email protected]>

* Rebase 'Implement v2/open inference endpoints for OOTB python model servers' changes

Signed-off-by: Andrews Arokiam <[email protected]>

* Update pyproject and poetry.lock for pandas and fastapi changes

Signed-off-by: Andrews Arokiam <[email protected]>

* Added poetry version with poetry install

Signed-off-by: Andrews Arokiam <[email protected]>

* Fix storage initializer

Remove alibi test for python 3.7

Signed-off-by: Andrews Arokiam <[email protected]>

* Updated python base image

Signed-off-by: Andrews Arokiam <[email protected]>

---------

Signed-off-by: Andrews Arokiam <[email protected]>
2023-04-07 10:03:22 -04:00

2.2 KiB

PMML Server

PMML is an XML-based predictive model interchange format conceived by Dr. Robert Lee Grossman, then the director of the National Center for Data Mining at the University of Illinois at Chicago. PMML provides a way for analytic applications to describe and exchange predictive models produced by data mining and machine learning algorithms.

To start the server locally for development needs, run the following command under this folder in your github repository.

make dev_install

Once PMML server is up and running, you can check for successful installation by running the following command

python3 -m pmmlserver
usage: __main__.py [-h] [--http_port HTTP_PORT] [--grpc_port GRPC_PORT] [--max_buffer_size MAX_BUFFER_SIZE] [--workers WORKERS] --model_dir MODEL_DIR [--model_name MODEL_NAME]
__main__.py: error: the following arguments are required: --model_dir

You can now point to your pmmlserver model directory and use the server to load the model and test for prediction. Model and associated model class file can be on local filesystem, S3 compatible object storage, Azure Blob Storage, or Google Cloud Storage. Please follow this sample to test your server by generating your own model.

Development

Install the development dependencies with:

make dev_install

To run tests, please change the test file to point to your model.pt file. Then run the following command:

make test

To run static type checks:

mypy --ignore-missing-imports pmmlserver

An empty result will indicate success.

Building your own PMML server Docker Image

You can build and publish your own image for development needs. Please ensure that you modify the inferenceservice files for pmml in the api directory to point to your own image.

To build your own image, navigate up one directory level to the python directory and run:

docker build . -t docker_user_name/pmmlserver:latest -f pmml.Dockerfile

To push your image to your dockerhub repo,

docker push docker_user_name/pmmlserver:latest