Seldon/Iter8 - Progressive AB Test with Multiple Seldon Deployments

In this example we will AB Test two Iris models: an SKLearn model and an XGBOOST model. We will run a progressive rollout allowing Iter8 to control the traffic to the two Seldon Deployments and gradually move traffic to the best model.

Install Depenendcies

  • Istio

  • Seldon Core

  • Seldon Core Analytics

  • Iter8

You can create a Kind cluster with all dependencies installed with Ansible with:

pip install ansible openshift
ansible-galaxy collection install git+https://github.com/SeldonIO/ansible-k8s-collection.git,v0.1.0

Then from example/iter8 folder run:

ansible-playbook playbooks/iter8.yml

Create ABTest with Two Seldon Deployments

!cat baseline.yaml
apiVersion: v1
kind: Namespace
metadata:
    name: ns-baseline
---
apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
  name: iris
  namespace: ns-baseline
spec:
  predictors:
  - name: default
    graph:
      name: classifier
      modelUri: gs://seldon-models/v1.19.0-dev/sklearn/iris
      implementation: SKLEARN_SERVER

Create Virtual Service to Split Traffic

Create some load on models.

We will send reqeusts which will be split by the Seldon AB Test as well as random feedback to both models with feedback favouring the candidate

Create Metrics to evaluate

These are a standard set of metrics we use in all examples.

Create Progressive Rollout Experiment

  • Run 15 iterations with 5 second gaps between default and candidate models

  • Both models must pass objectives

  • winnder will be chosen based on user engagement metric

Monitor Experiment

Download iter8ctl.

Then:

By the end you should see the xgboost candidate model is promoted.

Cleanup

Last updated

Was this helpful?