Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate use of Go Seldon Controller #559

Merged
merged 55 commits into from
May 18, 2019
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
12e62cb
add missing additionProperties to openAPI specs for CRDS
ukclivecox Apr 8, 2019
1f00d8b
Merge branch 'master' into go_operator_rewrite
ukclivecox Apr 13, 2019
cb4922b
remove parts of the openAPI validation that have properties that are …
ukclivecox Apr 14, 2019
a714564
Update notebooks
ukclivecox Apr 16, 2019
a4ec063
remove v1alpha3 and revert to v1alpha2
ukclivecox Apr 17, 2019
d854487
fix for svc-orchestrator name - add hash to name
ukclivecox Apr 18, 2019
60373cb
Merge branch 'master' into crd_v1alpha3_revert
ukclivecox Apr 18, 2019
054bbbb
rebase
ukclivecox Apr 18, 2019
88861b5
update openvino example
ukclivecox Apr 24, 2019
eae87ea
update openvino_imagenet demo
ukclivecox Apr 24, 2019
6c5f694
onnx resnet example update
ukclivecox Apr 24, 2019
04a4c8b
Update R MNIST demo
ukclivecox Apr 24, 2019
3ecefcf
Update Sagemaker example
ukclivecox Apr 25, 2019
840e44b
update nitebook docs
ukclivecox Apr 25, 2019
f1ae75a
update R examples
ukclivecox Apr 25, 2019
76163bd
update sklearn iris example!
ukclivecox Apr 25, 2019
686fd04
update skmnist example
ukclivecox Apr 25, 2019
29601bc
update deep mnist example
ukclivecox Apr 25, 2019
0579d41
update istio canary example
ukclivecox Apr 25, 2019
b66dacc
add oauth gateway helm chart
ukclivecox Apr 26, 2019
bc6934f
updates for gateway
ukclivecox Apr 26, 2019
275b2a2
testing uodates
ukclivecox Apr 26, 2019
b3f5790
Merge branch 'master' into go_operator_rewrite
ukclivecox Apr 26, 2019
7096fd8
updates for testing
ukclivecox Apr 29, 2019
d5629cd
fix redis name in apife chart
ukclivecox Apr 29, 2019
452366e
add seldon-core controller helm chart
ukclivecox May 1, 2019
1901aa0
add redis to gateway helm chart
ukclivecox May 1, 2019
c70b8dc
Update tests
ukclivecox May 3, 2019
1c792d4
Update docs
ukclivecox May 3, 2019
4bbda25
update helm charts
ukclivecox May 3, 2019
8598aff
merge master and update examples
ukclivecox May 4, 2019
96bffd2
update docs
ukclivecox May 4, 2019
daaf470
fic controller rbac
ukclivecox May 4, 2019
e384464
fix python send-feedback transport
ukclivecox May 4, 2019
29b4722
update helm chart docs
ukclivecox May 9, 2019
a3d0529
Update examples
ukclivecox May 10, 2019
967e0ce
fix usage_metrics -< usageMetrics in helm chart usage for seldon-core…
ukclivecox May 10, 2019
3b92dcc
update local private build scripts for controller
ukclivecox May 10, 2019
3827d3d
Update custom resource create script
ukclivecox May 10, 2019
ea2b972
update outlier detection examples
ukclivecox May 10, 2019
7c85e6d
update benchmark example
ukclivecox May 10, 2019
29a6fd7
update benchmark example
ukclivecox May 10, 2019
6619537
Merge branch 'master' into go_operator_rewrite
ukclivecox May 10, 2019
72091c2
fix helmMetrics value in seldon-core-controller helm chart
ukclivecox May 11, 2019
e9290ae
change seldon-core-controller to seldon-core-operator
ukclivecox May 14, 2019
e05416f
updates for tests for Ambassador
ukclivecox May 14, 2019
60b1711
update to 0.2.8-SNAPSHOT new helm charts images
ukclivecox May 14, 2019
7f0e72a
update release script and new helm charts using it
ukclivecox May 14, 2019
d666da1
downgrade to ambassador 0.40.2 for testing
ukclivecox May 15, 2019
1a44262
add upgrading doc
ukclivecox May 15, 2019
b4e3f5f
updates from reviews
ukclivecox May 16, 2019
1a65b64
update helm makefile and add comments for operator use of Ambassador
ukclivecox May 16, 2019
af12ae1
fix private repo start
ukclivecox May 16, 2019
29252e3
update router case study
ukclivecox May 18, 2019
6106907
Merge branch 'master' into go_operator_rewrite
ukclivecox May 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,5 @@ testing/scripts/tensorflow
testing/scripts/run.log
testing/scripts/my-model/
wrappers/s2i/python/_python/

seldon-controller/go
6 changes: 3 additions & 3 deletions Makefile.ci
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
.PHONY: build
build:
@set -x && cd cluster-manager && make -f Makefile.ci $@
@set -x && cd seldon-controller && make -f Makefile $@
@set -x && cd api-frontend && make -f Makefile.ci $@
@set -x && cd engine && make -f Makefile.ci clean $@

.PHONY: push_images_private_repo
push_images_private_repo:
@set -x && cd cluster-manager && make -f Makefile.ci push_image_private_repo
@set -x && cd seldon-controller && make -f Makefile push_image_private_repo
@set -x && cd api-frontend && make -f Makefile.ci push_image_private_repo
@set -x && cd engine && make -f Makefile.ci push_image_private_repo

.PHONY: clean
clean:
cd cluster-manager && make -f Makefile.ci $@
cd api-frontend && make -f Makefile.ci $@
cd engine && make -f Makefile.ci clean $@
cd seldon-controller && make -f Makefile clean $@

Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@
"outputs": [],
"source": [
"if MINIKUBE:\n",
" !minikube start --memory 4096 --feature-gates=CustomResourceValidation=true \\\n",
" --extra-config=apiserver.Authorization.Mode=RBAC\n",
" !minikube start --memory 4096\n",
"else:\n",
" !gcloud container clusters get-credentials standard-cluster-1 --zone europe-west1-b --project seldon-demos"
]
Expand Down Expand Up @@ -259,8 +258,14 @@
},
"outputs": [],
"source": [
"!helm install ../../../helm-charts/seldon-core-crd --name seldon-core-crd \\\n",
" --set usage_metrics.enabled=true"
"!helm install ../../../helm-charts/seldon-core-controller --name seldon-core --set usage_metrics.enabled=true --namespace seldon-system"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check deployment rollout status for seldon core."
]
},
{
Expand All @@ -271,16 +276,23 @@
},
"outputs": [],
"source": [
"!helm install ../../../helm-charts/seldon-core --name seldon-core \\\n",
" --namespace seldon \\\n",
" --set ambassador.enabled=true"
"!kubectl rollout status statefulset.apps/seldon-operator-controller-manager -n seldon-system"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check deployment rollout status for seldon core."
"Install Ambassador API gateway"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!helm install stable/ambassador --name ambassador --set image.tag=0.40.2"
ukclivecox marked this conversation as resolved.
Show resolved Hide resolved
]
},
{
Expand All @@ -289,8 +301,7 @@
"metadata": {},
"outputs": [],
"source": [
"!kubectl rollout status deploy/seldon-core-seldon-cluster-manager -n seldon\n",
"!kubectl rollout status deploy/seldon-core-seldon-apiserver -n seldon"
"!kubectl rollout status deployment.apps/ambassador"
]
},
{
Expand Down Expand Up @@ -436,7 +447,7 @@
},
"outputs": [],
"source": [
"response = rest_request_ambassador(\"outlier-detector\",request,endpoint=\"localhost:8003\")"
"response = rest_request_ambassador(\"outlier-detector\",\"seldon\",request,endpoint=\"localhost:8003\")"
]
},
{
Expand All @@ -453,7 +464,7 @@
"outputs": [],
"source": [
"if MODEL:\n",
" send_feedback_rest(\"outlier-detector\",request,response,0,labels,endpoint=\"localhost:8003\")"
" send_feedback_rest(\"outlier-detector\",\"seldon\",request,response,0,labels,endpoint=\"localhost:8003\")"
]
},
{
Expand Down Expand Up @@ -549,9 +560,9 @@
" fraction_outlier = .1\n",
" X, labels = generate_batch(data,samples,fraction_outlier)\n",
" request = get_payload(X)\n",
" response = rest_request_ambassador(\"outlier-detector\",request,endpoint=\"localhost:8003\")\n",
" response = rest_request_ambassador(\"outlier-detector\",\"seldon\",request,endpoint=\"localhost:8003\")\n",
" if MODEL:\n",
" send_feedback_rest(\"outlier-detector\",request,response,0,labels,endpoint=\"localhost:8003\")\n",
" send_feedback_rest(\"outlier-detector\",\"seldon\",request,response,0,labels,endpoint=\"localhost:8003\")\n",
" time.sleep(1)"
]
},
Expand Down Expand Up @@ -589,7 +600,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions components/outlier-detection/isolation-forest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,22 @@ def get_payload(arr):
payload = {"meta":{},"data":datadef}
return payload

def rest_request_ambassador(deploymentName,request,endpoint="localhost:8003"):
def rest_request_ambassador(deploymentName,namespace,request,endpoint="localhost:8003"):
response = requests.post(
"http://"+endpoint+"/seldon/"+deploymentName+"/api/v0.1/predictions",
"http://"+endpoint+"/seldon/"+namespace+"/"+deploymentName+"/api/v0.1/predictions",
json=request)
print(response.status_code)
print(response.text)
return response.json()

def send_feedback_rest(deploymentName,request,response,reward,truth,endpoint="localhost:8003"):
def send_feedback_rest(deploymentName,namespace,request,response,reward,truth,endpoint="localhost:8003"):
feedback = {
"request": request,
"response": response,
"reward": reward,
"truth": {"data":{"ndarray":truth.tolist()}}
}
ret = requests.post(
"http://"+endpoint+"/seldon/"+deploymentName+"/api/v0.1/feedback",
"http://"+endpoint+"/seldon/"+namespace+"/"+deploymentName+"/api/v0.1/feedback",
json=feedback)
return
return
45 changes: 27 additions & 18 deletions components/outlier-detection/mahalanobis/outlier_mahalanobis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@
"outputs": [],
"source": [
"if MINIKUBE:\n",
" !minikube start --memory 4096 --feature-gates=CustomResourceValidation=true \\\n",
" --extra-config=apiserver.Authorization.Mode=RBAC\n",
" !minikube start --memory 4096 \n",
"else:\n",
" !gcloud container clusters get-credentials standard-cluster-1 --zone europe-west1-b --project seldon-demos"
]
Expand Down Expand Up @@ -222,28 +221,39 @@
},
"outputs": [],
"source": [
"!helm install ../../../helm-charts/seldon-core-crd --name seldon-core-crd \\\n",
" --set usage_metrics.enabled=true"
"!helm install ../../../helm-charts/seldon-core-controller --name seldon-core --set usage_metrics.enabled=true --namespace seldon-system"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check deployment rollout status for seldon core."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"!helm install ../../../helm-charts/seldon-core --name seldon-core \\\n",
" --namespace seldon \\\n",
" --set ambassador.enabled=true"
"!kubectl rollout status statefulset.apps/seldon-operator-controller-manager -n seldon-system"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check deployment rollout status for seldon core."
"Install Ambassador API gateway"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!helm install stable/ambassador --name ambassador --set image.tag=0.40.2"
]
},
{
Expand All @@ -252,8 +262,7 @@
"metadata": {},
"outputs": [],
"source": [
"!kubectl rollout status deploy/seldon-core-seldon-cluster-manager -n seldon\n",
"!kubectl rollout status deploy/seldon-core-seldon-apiserver -n seldon"
"!kubectl rollout status deployment.apps/ambassador"
]
},
{
Expand Down Expand Up @@ -405,7 +414,7 @@
},
"outputs": [],
"source": [
"response = rest_request_ambassador(\"outlier-detector\",request,endpoint=\"localhost:8003\")"
"response = rest_request_ambassador(\"outlier-detector\",\"seldon\",request,endpoint=\"localhost:8003\")"
]
},
{
Expand All @@ -422,7 +431,7 @@
"outputs": [],
"source": [
"if MODEL:\n",
" send_feedback_rest(\"outlier-detector\",request,response,0,labels,endpoint=\"localhost:8003\")"
" send_feedback_rest(\"outlier-detector\",\"seldon\",request,response,0,labels,endpoint=\"localhost:8003\")"
]
},
{
Expand Down Expand Up @@ -520,9 +529,9 @@
" fraction_outlier = .1\n",
" X, labels = generate_batch(data,samples,fraction_outlier)\n",
" request = get_payload(X)\n",
" response = rest_request_ambassador(\"outlier-detector\",request,endpoint=\"localhost:8003\")\n",
" response = rest_request_ambassador(\"outlier-detector\",\"seldon\",request,endpoint=\"localhost:8003\")\n",
" if MODEL:\n",
" send_feedback_rest(\"outlier-detector\",request,response,0,labels,endpoint=\"localhost:8003\")\n",
" send_feedback_rest(\"outlier-detector\",\"seldon\",request,response,0,labels,endpoint=\"localhost:8003\")\n",
" time.sleep(1)"
]
},
Expand Down Expand Up @@ -560,7 +569,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions components/outlier-detection/mahalanobis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,22 @@ def get_payload(arr):
payload = {"meta":{},"data":datadef}
return payload

def rest_request_ambassador(deploymentName,request,endpoint="localhost:8003"):
def rest_request_ambassador(deploymentName,namespace,request,endpoint="localhost:8003"):
response = requests.post(
"http://"+endpoint+"/seldon/"+deploymentName+"/api/v0.1/predictions",
"http://"+endpoint+"/seldon/"+namespace+"/"+deploymentName+"/api/v0.1/predictions",
json=request)
print(response.status_code)
print(response.text)
return response.json()

def send_feedback_rest(deploymentName,request,response,reward,truth,endpoint="localhost:8003"):
def send_feedback_rest(deploymentName,namespace,request,response,reward,truth,endpoint="localhost:8003"):
feedback = {
"request": request,
"response": response,
"reward": reward,
"truth": {"data":{"ndarray":truth.tolist()}}
}
ret = requests.post(
"http://"+endpoint+"/seldon/"+deploymentName+"/api/v0.1/feedback",
"http://"+endpoint+"/seldon/"+namespace+"/"+deploymentName+"/api/v0.1/feedback",
json=feedback)
return
return
Loading