mirror of https://github.com/kubeflow/examples.git
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:
parent
fc5a85b948
commit
c234f18b0b
|
|
@ -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`
|
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": {
|
"meta": {
|
||||||
"names": [
|
"puid": "8buc4oo78m67716m2vevvgtpap",
|
||||||
"t:0",
|
"tags": {
|
||||||
"t:1"
|
},
|
||||||
],
|
"routing": {
|
||||||
"tensor": {
|
|
||||||
"shape": [
|
|
||||||
1,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
"values": [
|
|
||||||
97522.359375,
|
|
||||||
97522.359375
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"names": ["t:0", "t:1"],
|
||||||
|
"tensor": {
|
||||||
|
"shape": [1, 2],
|
||||||
|
"values": [97522.359375, 97522.359375]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue