-
Notifications
You must be signed in to change notification settings - Fork 835
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change service key to allow container services to always match correc…
…tly (#4043) * Change service key to allow container services to always match correctly * add combiner example * ad missing graph examples linj * recreate deployments and services whos selectors change * update licences
- Loading branch information
1 parent
472d5dc
commit f5c3a29
Showing
12 changed files
with
500 additions
and
33,925 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,3 @@ | ||
{ | ||
"path": "../../../examples/graph_examples/graph-examples.ipynb" | ||
} |
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,34 @@ | ||
apiVersion: machinelearning.seldon.io/v1 | ||
kind: SeldonDeployment | ||
metadata: | ||
name: test | ||
spec: | ||
name: test | ||
predictors: | ||
- componentSpecs: | ||
- spec: | ||
containers: | ||
- name: combiner | ||
image: seldonio/metadata-generic-node:1.14.0-dev | ||
- name: model-1 | ||
image: seldonio/metadata-generic-node:1.14.0-dev | ||
- name: model-2 | ||
image: seldonio/metadata-generic-node:1.14.0-dev | ||
graph: | ||
children: | ||
- children: [] | ||
name: model-1 | ||
type: MODEL | ||
endpoint: | ||
type: REST | ||
- children: [] | ||
name: model-2 | ||
type: MODEL | ||
endpoint: | ||
type: REST | ||
endpoint: | ||
type: REST | ||
name: combiner | ||
type: COMBINER | ||
name: combiner | ||
replicas: 1 |
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,306 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "945f9db1", | ||
"metadata": {}, | ||
"source": [ | ||
"# Graph Examples\n", | ||
"\n", | ||
"Port-forward to that ingress on localhost:8003 in a separate terminal either with:\n", | ||
"\n", | ||
" * Ambassador: `kubectl port-forward $(kubectl get pods -n seldon -l app.kubernetes.io/name=ambassador -o jsonpath='{.items[0].metadata.name}') -n seldon 8003:8080`\n", | ||
" * Istio: `kubectl port-forward $(kubectl get pods -l istio=ingressgateway -n istio-system -o jsonpath='{.items[0].metadata.name}') -n istio-system 8003:8080`\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "0bcfe613", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl create namespace seldon" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "c6d2452b", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl config set-context $(kubectl config current-context) --namespace=seldon" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "33e483c7", | ||
"metadata": {}, | ||
"source": [ | ||
"## Input and output transformer with model in same pod" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "d6b9dca0", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!cat tin-model-tout.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "c6f39a99", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl create -f tin-model-tout.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "ba27098e", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl wait --for condition=ready --timeout=300s sdep --all -n seldon" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "6f02a38f", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!curl -s -d '{\"data\": {\"ndarray\":[[1.0, 2.0, 5.0]]}}' \\\n", | ||
" -X POST http://localhost:8003/seldon/seldon/test/api/v1.0/predictions \\\n", | ||
" -H \"Content-Type: application/json\"" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "a9a8aa88", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl delete -f tin-model-tout.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "5ab6d167", | ||
"metadata": {}, | ||
"source": [ | ||
"## Input and output transformer with model in separate pods" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "d86ed5c7", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!cat tin-model-tout-sep-pods.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "f7c5178c", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl create -f tin-model-tout-sep-pods.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "5a83a428", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl wait --for condition=ready --timeout=300s sdep --all -n seldon" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "2d8ba680", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!curl -s -d '{\"data\": {\"ndarray\":[[1.0, 2.0, 5.0]]}}' \\\n", | ||
" -X POST http://localhost:8003/seldon/seldon/test/api/v1.0/predictions \\\n", | ||
" -H \"Content-Type: application/json\"" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "7febb431", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl delete -f tin-model-tout-sep-pods.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "a95de935", | ||
"metadata": {}, | ||
"source": [ | ||
"## Input and output transformer with svcOrch in separate pod" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "f89eaa5d", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!cat tin-model-tout-sep-svcorch.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "9b073c46", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl create -f tin-model-tout-sep-svcorch.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "ef70b350", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl wait --for condition=ready --timeout=300s sdep --all -n seldon" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "08892e09", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!curl -s -d '{\"data\": {\"ndarray\":[[1.0, 2.0, 5.0]]}}' \\\n", | ||
" -X POST http://localhost:8003/seldon/seldon/test/api/v1.0/predictions \\\n", | ||
" -H \"Content-Type: application/json\"" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "3497c521", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl delete -f tin-model-tout-sep-svcorch.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "1ec22240", | ||
"metadata": {}, | ||
"source": [ | ||
"## Combiner" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "5c08af72", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!cat combiner.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "dc5fdbab", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl create -f combiner.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "b4691f11", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl wait --for condition=ready --timeout=300s sdep --all -n seldon" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "3268c165", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!curl -s -d '{\"data\": {\"ndarray\":[[1.0, 2.0, 5.0]]}}' \\\n", | ||
" -X POST http://localhost:8003/seldon/seldon/test/api/v1.0/predictions \\\n", | ||
" -H \"Content-Type: application/json\"" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "5895393c", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl delete -f combiner.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "7b12320a", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.10" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Oops, something went wrong.