-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add java to pmmlserver, add testing instructions
- Loading branch information
1 parent
cb99874
commit d7b588a
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Testing instructions | ||
|
||
From the [upstream usage example](https://kserve.github.io/website/master/modelserving/v1beta1/pmml/), 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/pmml ./sample_model/ | ||
# mount the model into the container at runtime | ||
docker run -p 8080:8080 -v $(pwd)/sample_model/pmml:/mnt/models pmmlserver:0.11.2 --model_name test_model --model_dir=/mnt/models --http_port=8080 | ||
``` | ||
|
||
Test the server with: | ||
``` | ||
cat <<EOF >> input.json | ||
{ | ||
"instances": [ | ||
[5.1, 3.5, 1.4, 0.2] | ||
] | ||
} | ||
EOF | ||
curl -v \ | ||
-H "Content-Type: application/json" \ | ||
-d @./input.json \ | ||
localhost:8080/v1/models/test_model:predict | ||
``` | ||
|
||
which should return the expected output described in the docs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters