From d4fc0337c3fbdfde94b2016ad9cb844324b3895e Mon Sep 17 00:00:00 2001 From: Andrew Scribner Date: Thu, 29 Feb 2024 11:35:54 -0500 Subject: [PATCH 1/5] bump sklearnserver rock to 0.11.2 --- sklearnserver/rockcraft.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sklearnserver/rockcraft.yaml b/sklearnserver/rockcraft.yaml index 081ffb5..9166e49 100644 --- a/sklearnserver/rockcraft.yaml +++ b/sklearnserver/rockcraft.yaml @@ -6,7 +6,7 @@ name: sklearnserver summary: sklearn server for Kserve deployments description: "Kserve sklearn server" -version: "0.11.0" +version: "0.11.2" license: Apache-2.0 base: ubuntu@22.04 platforms: @@ -33,7 +33,7 @@ parts: plugin: nil source: https://github.com/kserve/kserve.git source-subdir: python - source-tag: v0.11.0 + source-tag: v0.11.2 build-packages: - build-essential - libgomp1 @@ -73,7 +73,7 @@ parts: after: [python] source: https://github.com/kserve/kserve.git source-subdir: python - source-tag: v0.11.0 + source-tag: v0.11.2 override-build: | cp -fr third_party/* ${CRAFT_PART_INSTALL}/third_party From 99b92c8b5ead3e5ddf24f7ad2cc78b89bcaa95d5 Mon Sep 17 00:00:00 2001 From: Andrew Scribner Date: Thu, 29 Feb 2024 13:55:10 -0500 Subject: [PATCH 2/5] add testing instructions for sklearn server --- sklearnserver/README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sklearnserver/README.md diff --git a/sklearnserver/README.md b/sklearnserver/README.md new file mode 100644 index 0000000..bfef8e6 --- /dev/null +++ b/sklearnserver/README.md @@ -0,0 +1,39 @@ +## Testing instructions + +From the [upstream usage example](https://kserve.github.io/website/master/modelserving/v1beta1/sklearn/v2/#deploy-the-model-with-rest-endpoint-through-inferenceservice/), this rock can be tested locally using: + +Launch the server with: +``` +# download the model locally +gsutil cp -r gs://kfserving-examples/models/sklearn/1.0/model ./sample_model/ + +# mount the model into the container at runtime +docker run -p 8080:8080 -v $(pwd)/sample_model:/mnt/models sklearnserver:0.11.2 --model_name test_model --model_dir=/mnt/models --http_port=8080 + +``` + +Test the server with: +``` +cat <> iris-input-v2.json +{ + "inputs": [ + { + "name": "input-0", + "shape": [2, 4], + "datatype": "FP32", + "data": [ + [6.8, 2.8, 4.8, 1.4], + [6.0, 3.4, 4.5, 1.6] + ] + } + ] +} +EOF + +curl -v \ + -H "Content-Type: application/json" \ + -d @./iris-input-v2.json \ + localhost:8080/v2/models/test_model/infer +``` + +which should return the expected output described in the docs. From d2b3d46e2878f7ff18bf768b20e44698be572c63 Mon Sep 17 00:00:00 2001 From: Andrew Scribner Date: Thu, 29 Feb 2024 15:15:31 -0500 Subject: [PATCH 3/5] fix typo in readme.md --- sklearnserver/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sklearnserver/README.md b/sklearnserver/README.md index bfef8e6..2725fe4 100644 --- a/sklearnserver/README.md +++ b/sklearnserver/README.md @@ -5,6 +5,7 @@ From the [upstream usage example](https://kserve.github.io/website/master/models Launch the server with: ``` # download the model locally +mkdir sample_model gsutil cp -r gs://kfserving-examples/models/sklearn/1.0/model ./sample_model/ # mount the model into the container at runtime From db720948587c3edc104a8c0a7d57b2254918a367 Mon Sep 17 00:00:00 2001 From: Andrew Scribner Date: Fri, 1 Mar 2024 13:46:42 -0500 Subject: [PATCH 4/5] Update sklearnserver/README.md Co-authored-by: Daniela Plascencia --- sklearnserver/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearnserver/README.md b/sklearnserver/README.md index 2725fe4..fe203c3 100644 --- a/sklearnserver/README.md +++ b/sklearnserver/README.md @@ -9,7 +9,7 @@ mkdir sample_model gsutil cp -r gs://kfserving-examples/models/sklearn/1.0/model ./sample_model/ # mount the model into the container at runtime -docker run -p 8080:8080 -v $(pwd)/sample_model:/mnt/models sklearnserver:0.11.2 --model_name test_model --model_dir=/mnt/models --http_port=8080 +docker run -p 8080:8080 -v $(pwd)/sample_model:/mnt/models sklearnserver: --model_name test_model --model_dir=/mnt/models --http_port=8080 ``` From 848de7d7a722f1b9a5ecf7a0b8a970a227c37c6d Mon Sep 17 00:00:00 2001 From: Andrew Scribner Date: Fri, 1 Mar 2024 13:50:55 -0500 Subject: [PATCH 5/5] Add prerequisites to testing instructions --- sklearnserver/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sklearnserver/README.md b/sklearnserver/README.md index fe203c3..00634fc 100644 --- a/sklearnserver/README.md +++ b/sklearnserver/README.md @@ -1,4 +1,11 @@ -## Testing instructions +## Testing + +### Prerequisites + +* docker +* Google Cloud CLI tools ([installation guide](https://cloud.google.com/sdk/docs/install)) + +### Instructions From the [upstream usage example](https://kserve.github.io/website/master/modelserving/v1beta1/sklearn/v2/#deploy-the-model-with-rest-endpoint-through-inferenceservice/), this rock can be tested locally using: