Local experiments

Model Experiment

We will use two SKlearn Iris classification models to illustrate experiments.

cat ./models/sklearn1.yaml
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
  name: iris
spec:
  storageUri: "gs://seldon-models/mlserver/iris"
  requirements:
  - sklearn
cat ./models/sklearn2.yaml
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
  name: iris2
spec:
  storageUri: "gs://seldon-models/mlserver/iris"
  requirements:
  - sklearn

Load both models.

Wait for both models to be ready.

Create an experiment that modifies the iris model to add a second model splitting traffic 50/50 between the two.

Start the experiment.

Wait for the experiment to be ready.

Run a set of calls and record which route the traffic took. There should be roughly a 50/50 split.

Show sticky session header x-seldon-route that is returned

Use sticky session key passed by last infer request to ensure same route is taken each time.

Stop the experiment

Unload both models.

Pipeline Experiment

Use sticky session key passed by last infer request to ensure same route is taken each time.

Model Mirror Experiment

We will use two SKlearn Iris classification models to illustrate a model with a mirror.

Load both models.

Wait for both models to be ready.

Create an experiment that modifies in which we mirror traffic to iris also to iris2.

Start the experiment.

Wait for the experiment to be ready.

We get responses from iris but all requests would also have been mirrored to iris2

We can check the local prometheus port from the agent to validate requests went to iris2

Stop the experiment

Unload both models.

Pipeline Mirror Experiment

Let's check that the mul10 model was called.

Let's do an http call and check agaib the two models

Last updated

Was this helpful?