Seldon/Iter8 - Progressive AB Test with Single Seldon Deployment
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.0Then from example/iter8 folder run:
ansible-playbook playbooks/iter8.ymlCreate ABTest with Two Predictors
!cat abtest.yamlapiVersion: v1
kind: Namespace
metadata:
name: ns-production
---
apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: iris
namespace: ns-production
spec:
predictors:
- name: baseline
traffic: 100
graph:
name: classifier
modelUri: gs://seldon-models/v1.19.0-dev/sklearn/iris
implementation: SKLEARN_SERVER
- name: candidate
traffic: 0
graph:
name: classifier
modelUri: gs://seldon-models/xgboost/iris
implementation: XGBOOST_SERVERCreate 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?