githubEdit

Ambassador Shadow

This notebook shows how you can deploy "shadow" deployments to direct traffic not only to the main Seldon Deployment but also to a shadow deployment whose response will be dicarded. This allows you to test new models in a production setting and with production traffic and anlalyse how they perform before putting them live.

These are useful when you want to test a new model or higher latency inference piepline (e.g., with explanation components) with production traffic but without affecting the live deployment.

Setup Seldon Core

Use the setup notebook to Setup Clusterarrow-up-right with Ambassador Ingressarrow-up-right.

!kubectl create namespace seldon
Error from server (AlreadyExists): namespaces "seldon" already exists
from IPython.core.magic import register_line_cell_magic


@register_line_cell_magic
def writetemplate(line, cell):
    with open(line, "w") as f:
        f.write(cell.format(**globals()))
VERSION = !cat ../../../version.txt
VERSION = VERSION[0]
VERSION
'1.19.0-dev'

Launch main model

We will create a very simple Seldon Deployment with a dummy model image seldonio/mock_classifier. This deployment is named example.

Get predictions

REST Request

Launch Shadow

We will now create a new Seldon Deployment for our Shadow deployment with a new model.

Let's send a bunch of requests to the endpoint.

TearDown

Last updated

Was this helpful?