githubEdit

Kubernetes examples

circle-info

Note: The Seldon CLI allows you to view information about underlying Seldon resources and make changes to them through the scheduler in non-Kubernetes environments. However, it cannot modify underlying manifests within a Kubernetes cluster. Therefore, using the Seldon CLI for control plane operations in a Kubernetes environment is not recommended. For more details, see Seldon CLI.

Before you begin

  1. Ensure that you have installed Seldon Core 2 in the namespace seldon-mesh.

  2. Ensure that you are performing these steps in the directory where you have downloaded the samplesarrow-up-right.

  3. Get the IP address of the Seldon Core 2 instance running with Istio:

ISTIO_INGRESS=$(kubectl get svc seldon-mesh -n seldon-mesh -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

echo "Seldon Core 2: http://$ISTIO_INGRESS"
circle-info

Make a note of the IP address that is displayed in the output. Replace <INGRESS_IP> with your service mesh's ingress IP address in the following commands.

Create a Model

cat ./models/sklearn-iris-gs.yaml
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
  name: iris
spec:
  storageUri: "gs://seldon-models/scv2/samples/mlserver_1.3.5/iris-sklearn"
  requirements:
  - sklearn
  memory: 100Ki

Output is similar to:

Make a gRPC inference call

Delete the model

Experiment

Pipeline - model chain

Pipeline - model join

```bash curl -k :80/v2/models/join/infer \ -H "Host: seldon-mesh.inference.seldon" \ -H "Content-Type: application/json" \ -H "Seldon-Model: join.pipeline" \ -d '{ "model_name": "simple", "inputs": [ { "name": "INPUT0", "datatype": "INT32", "shape": [1, 16], "data": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] }, { "name": "INPUT1", "datatype": "INT32", "shape": [1, 16], "data": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] } ] }' |jq

Explainer

Last updated

Was this helpful?