Fix curl command when sending request to seldon-served model on GKE (#415)

* fix curl command when sending request to seldon-served model on GKE

* modified response
This commit is contained in:
Azmi Kamis 2018-12-09 06:44:06 +08:00 committed by Kubernetes Prow Robot
parent fc5a85b948
commit c234f18b0b
1 changed files with 14 additions and 15 deletions

View File

@ -186,26 +186,25 @@ kubectl port-forward $(kubectl get pods -n ${NAMESPACE} -l service=ambassador -o
Now you are ready to send requests on `localhost:8080`
```
curl -H "Content-Type: application/x-www-form-urlencoded" -d 'json={"data":{"tensor":{"shape":[1,37],"values":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]}}}' http://localhost:8080/predict
curl -H "Content-Type:application/json" \
-d '{"data":{"tensor":{"shape":[1,37],"values":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]}}}' \
http://localhost:8080/seldon/xgboost-ames/api/v0.1/predictions
```
```
{
"data": {
"names": [
"t:0",
"t:1"
],
"tensor": {
"shape": [
1,
2
],
"values": [
97522.359375,
97522.359375
]
"meta": {
"puid": "8buc4oo78m67716m2vevvgtpap",
"tags": {
},
"routing": {
}
},
"data": {
"names": ["t:0", "t:1"],
"tensor": {
"shape": [1, 2],
"values": [97522.359375, 97522.359375]
}
}
```