forked from kubeflow/pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add readme for azure * add onnx as a fwk * add swagger gen files * delete extra reame * fix test args * fix test * regenerate files after merge * update with sample that works * use args correctly * add example * add instructions for own model * add onnx version * make notebook into a link * fix test * actually fix test * add newline * add clarification to readme * add requirements txt
- Loading branch information
1 parent
a697d83
commit 4d2cd70
Showing
17 changed files
with
2,322 additions
and
4 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
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
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
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,38 @@ | ||
|
||
# Predict on a KFService using ONNX | ||
## Setup | ||
1. Your ~/.kube/config should point to a cluster with [KFServing installed](https://github.com/kubeflow/kfserving/blob/master/docs/DEVELOPER_GUIDE.md#deploy-kfserving). | ||
2. Your cluster's Istio Ingress gateway must be network accessible. | ||
3. Your cluster's Istio Egresss gateway must [allow Google Cloud Storage](https://knative.dev/docs/serving/outbound-network-access/) | ||
|
||
## Create the KFService | ||
Apply the CRD | ||
``` | ||
kubectl apply -f onnx.yaml | ||
``` | ||
|
||
Expected Output | ||
``` | ||
$ kfservice.serving.kubeflow.org/style-sample configured | ||
``` | ||
|
||
## Run a sample inference | ||
1. Setup env vars | ||
``` | ||
export SERVICE_URL=$(kubectl get kfservice ${MODEL_NAME} -o jsonpath='{.status.url}') | ||
``` | ||
2. Verify the service is healthy | ||
``` | ||
curl ${SERVICE_URL} | ||
``` | ||
3. Install dependencies | ||
``` | ||
pip install -r requirements.txt | ||
``` | ||
4. Run the [sample notebook](mosaic-onnx.ipynb) in jupyter | ||
``` | ||
jupyter notebook | ||
``` | ||
|
||
## Uploading your own model | ||
The sample model for the example in this readme is already uploaded and available for use. However if you would like to modify the example to use your own ONNX model, all you need to do is to upload your model as `model.onnx` to S3, GCS or an Azure Blob. |
Oops, something went wrong.