<jupyter_start><jupyter_text>Example Seldon Core Deployments using Helm  Setup Seldon CoreUse the setup notebook to [Setup Cluster](seldon_core_setup.ipynbSetup-Cluster) with [Ambassador Ingress](seldon_core_setup.ipynbAmbassador) and [Install Seldon Core](seldon_core_setup.ipynbInstall-Seldon-Core). Instructions [also online](./seldon_core_setup.html).<jupyter_code>!kubectl create namespace seldon
!kubectl config set-context $(kubectl config current-context) --namespace=seldon<jupyter_output><empty_output><jupyter_text>Serve Single REST Model<jupyter_code>!helm install mymodel ../helm-charts/seldon-single-model
!helm template ../helm-charts/seldon-single-model | pygmentize -l json
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=mymodel -o jsonpath='{.items[0].metadata.name}')<jupyter_output><empty_output><jupyter_text>Get predictions<jupyter_code>from seldon_core.seldon_client import SeldonClient
sc = SeldonClient(deployment_name="mymodel",namespace="seldon",gateway_endpoint="localhost:8003",gateway="ambassador")<jupyter_output><empty_output><jupyter_text>REST Request<jupyter_code>r = sc.predict(transport="rest")
assert(r.success==True)
print(r)
!helm delete mymodel<jupyter_output><empty_output><jupyter_text>Serve Single GRPC Model<jupyter_code>!helm install mymodel ../helm-charts/seldon-single-model --set protocol=GRPC
!helm template ../helm-charts/seldon-single-model --set protocol=GRPC | pygmentize -l json
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=mymodel -o jsonpath='{.items[0].metadata.name}')<jupyter_output><empty_output><jupyter_text>Get predictions<jupyter_code>from seldon_core.seldon_client import SeldonClient
sc = SeldonClient(deployment_name="mymodel",namespace="seldon",gateway_endpoint="localhost:8003",gateway="ambassador", debug=True)<jupyter_output><empty_output><jupyter_text>GRPC Request<jupyter_code>r = sc.predict(transport="grpc")
print(r)
!helm delete mymodel<jupyter_output><empty_output><jupyter_text>Serve REST AB Test<jupyter_code>!helm install myabtest ../helm-charts/seldon-abtest
!helm template ../helm-charts/seldon-abtest | pygmentize -l json
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=myabtest -o jsonpath='{.items[0].metadata.name}')
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=myabtest -o jsonpath='{.items[1].metadata.name}')<jupyter_output><empty_output><jupyter_text>Get predictions<jupyter_code>from seldon_core.seldon_client import SeldonClient
sc = SeldonClient(deployment_name="myabtest",namespace="seldon",gateway_endpoint="localhost:8003",gateway="ambassador")<jupyter_output><empty_output><jupyter_text>REST Request<jupyter_code>r = sc.predict(transport="rest")
assert(r.success==True)
print(r)
!helm delete myabtest<jupyter_output><empty_output><jupyter_text>Serve GRPC AB Test<jupyter_code>!helm install myabtest ../helm-charts/seldon-abtest --set protocol=GRPC
!helm template ../helm-charts/seldon-abtest --set protocol=GRPC | pygmentize -l json
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=myabtest -o jsonpath='{.items[0].metadata.name}')
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=myabtest -o jsonpath='{.items[1].metadata.name}')<jupyter_output><empty_output><jupyter_text>Get predictions<jupyter_code>from seldon_core.seldon_client import SeldonClient
sc = SeldonClient(deployment_name="myabtest",namespace="seldon",gateway_endpoint="localhost:8003",gateway="ambassador")<jupyter_output><empty_output><jupyter_text>REST Request<jupyter_code>r = sc.predict(transport="grpc")
print(r)
!helm delete myabtest<jupyter_output><empty_output><jupyter_text>Serve REST Multi-Armed Bandit<jupyter_code>!helm install mymab ../helm-charts/seldon-mab
!helm template ../helm-charts/seldon-mab | pygmentize -l json
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=mymab -o jsonpath='{.items[0].metadata.name}')
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=mymab -o jsonpath='{.items[1].metadata.name}')
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=mymab -o jsonpath='{.items[2].metadata.name}')<jupyter_output><empty_output><jupyter_text>Get predictions<jupyter_code>from seldon_core.seldon_client import SeldonClient
sc = SeldonClient(deployment_name="mymab",namespace="seldon",gateway_endpoint="localhost:8003",gateway="ambassador")<jupyter_output><empty_output><jupyter_text>REST Request<jupyter_code>r = sc.predict(transport="rest")
assert(r.success==True)
print(r)
!helm delete mymab<jupyter_output><empty_output><jupyter_text>Serve GRPC Multi-Armed Bandit<jupyter_code>!helm install mymab ../helm-charts/seldon-mab --set protocol=GRPC
!helm template ../helm-charts/seldon-mab --set protocol=GRPC | pygmentize -l json
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=mymab -o jsonpath='{.items[0].metadata.name}')
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=mymab -o jsonpath='{.items[1].metadata.name}')
!kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=mymab -o jsonpath='{.items[2].metadata.name}')<jupyter_output><empty_output><jupyter_text>Get predictions<jupyter_code>from seldon_core.seldon_client import SeldonClient
sc = SeldonClient(deployment_name="mymab",namespace="seldon",gateway_endpoint="localhost:8003",gateway="ambassador")<jupyter_output><empty_output><jupyter_text>REST Request<jupyter_code>r = sc.predict(transport="grpc")
print(r)
!helm delete mymab<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup