Skip to content

Commit

Permalink
Fix url path in the example (kubeflow#410)
Browse files Browse the repository at this point in the history
* Fix transformer url path in the example

* Fix more url paths

* Fix more url paths
  • Loading branch information
yuzisun authored and k8s-ci-robot committed Oct 5, 2019
1 parent 09bea22 commit 1d08f48
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/samples/pytorch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ CLUSTER_IP=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpat
SERVICE_HOSTNAME=$(kubectl get kfservice pytorch-cifar10 -o jsonpath='{.status.url}' |sed 's/.*:\/\///g')
curl -v -H "Host: ${SERVICE_HOSTNAME}" -d $INPUT_PATH http://$CLUSTER_IP/models/$MODEL_NAME:predict
curl -v -H "Host: ${SERVICE_HOSTNAME}" -d $INPUT_PATH http://$CLUSTER_IP/v1/models/$MODEL_NAME:predict
```

You should see an output similar to the one below:
Expand Down
6 changes: 3 additions & 3 deletions docs/samples/sklearn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ X, y = iris.data, iris.target
formData = {
'instances': X[0:1].tolist()
}
res = requests.post('http://localhost:8080/models/svm:predict', json=formData)
res = requests.post('http://localhost:8080/v1/models/svm:predict', json=formData)
print(res)
print(res.text)
```
Expand Down Expand Up @@ -58,8 +58,8 @@ $ kfservice.serving.kubeflow.org/sklearn-iris created
MODEL_NAME=sklearn-iris
INPUT_PATH=@./iris-input.json
CLUSTER_IP=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
curl -v -H "Host: sklearn-iris.default.svc.cluster.local" http://$CLUSTER_IP/models/$MODEL_NAME:predict -d $INPUT_PATH
SERVICE_HOSTNAME=$(kubectl get kfservice sklearn-iris -o jsonpath='{.status.url}' | sed 's/.*:\/\///g')
curl -v -H "Host: ${SERVICE_HOSTNAME}" http://$CLUSTER_IP/v1/models/$MODEL_NAME:predict -d $INPUT_PATH
```

Expected Output
Expand Down
2 changes: 1 addition & 1 deletion docs/samples/transformer/image_transformer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ CLUSTER_IP=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpat
SERVICE_HOSTNAME=$(kubectl get kfservice transformer-cifar10 -o jsonpath='{.status.url}' | sed 's/.*:\/\///g')
curl -v -H "Host: ${SERVICE_HOSTNAME}" -d $INPUT_PATH http://$CLUSTER_IP/models/$MODEL_NAME:predict
curl -v -H "Host: ${SERVICE_HOSTNAME}" -d $INPUT_PATH http://$CLUSTER_IP/v1/models/$MODEL_NAME:predict
```

You should see an output similar to the one below:
Expand Down
4 changes: 2 additions & 2 deletions docs/samples/xgboost/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ $ kfservice.serving.kubeflow.org/xgboost-iris created
MODEL_NAME=xgboost-iris
INPUT_PATH=@./iris-input.json
CLUSTER_IP=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
curl -v -H "Host: xgboost-iris.default.svc.cluster.local" http://$CLUSTER_IP/models/$MODEL_NAME:predict -d $INPUT_PATH
SERVICE_HOSTNAME=$(kubectl get kfservice xgboost-iris -o jsonpath='{.status.url}' | sed 's/.*:\/\///g')
curl -v -H "Host: ${SERVICE_HOSTNAME}" http://$CLUSTER_IP/v1/models/$MODEL_NAME:predict -d $INPUT_PATH
```

Expected Output
Expand Down

0 comments on commit 1d08f48

Please sign in to comment.