<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>Context "kind-kind" modified.<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/mymodel-mymodel-de240ba<jupyter_output>Waiting for deployment "mymodel-mymodel-de240ba" rollout to finish: 0 of 1 updated replicas are available...
deployment "mymodel-mymodel-de240ba" successfully rolled out<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")
print(r)
!helm delete mymodel<jupyter_output>release "mymodel" uninstalled<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/mymodel-mymodel-2a00e84<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>REST 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/myabtest-myabtest-0cce7b2
!kubectl rollout status deploy/myabtest-myabtest-ba661ba<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")
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/myabtest-myabtest-050eba7
!kubectl rollout status deploy/myabtest-myabtest-5ffb9f0<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/mymab-mymab-0cce7b2
!kubectl rollout status deploy/mymab-mymab-b8038b2
!kubectl rollout status deploy/mymab-mymab-ba661ba<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")
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/mymab-mymab-050eba7
!kubectl rollout status deploy/mymab-mymab-5f10a24
!kubectl rollout status deploy/mymab-mymab-5ffb9f0<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>
{'fraction_non_alphanumeric': 0.11283411548663538, 'fraction_numerical': 0.015507039379718425, 'mean_word_length': 9.917594654788418, 'pattern_counts': {'":': 0, '<': 74, '<?xml version=': 0, '>': 74, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '19', 'dir': 'jupyter-structured-clean-dedup', 'id': '324682', 'license': 'Apache-2.0', 'n_tokens_mistral': 1871, 'n_tokens_neox': 1758, 'n_words': 262, 'path': 'notebooks/helm_examples.ipynb', 'repo_name': 'pravingadakh/seldon-core', 'size': '4901'}