Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump sklearnserver rock to 0.11.2 #37

Merged
merged 5 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions sklearnserver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## 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:

Launch the server with:
```
# download the model locally
mkdir sample_model
gsutil cp -r gs://kfserving-examples/models/sklearn/1.0/model ./sample_model/
DnPlas marked this conversation as resolved.
Show resolved Hide resolved

# mount the model into the container at runtime
docker run -p 8080:8080 -v $(pwd)/sample_model:/mnt/models sklearnserver:<version> --model_name test_model --model_dir=/mnt/models --http_port=8080

```

Test the server with:
```
cat <<EOF >> 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.
6 changes: 3 additions & 3 deletions sklearnserver/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
platforms:
Expand All @@ -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
Expand Down Expand Up @@ -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

Loading