githubEdit

Training Outlier Detector for CIFAR10 with Poetry

⚠️ This notebook has been deprecated and it may require modifications to work correctly.

Training Outlier Detector for CIFAR10 with Poetry

Outlier Detector for Cifar10 model with Poetry-defined Environment

Prerequisites

  • A kubernetes cluster with kubectl configured

  • poetry

  • rclone

  • curl

Setup Seldon Core

Use the setup notebook to Setup Cluster with Ambassador Ingress and Install Seldon Core.

We will assume that ambassador (or Istio) ingress is port-forwarded to localhost:8003

!kubectl create namespace cifar10 || true
namespace/cifar10 created

Setup MinIO

Use the provided notebook to install Minio in your cluster.

We will assume that MinIO service is port-forwarded to localhost:8090

Poetry

We will use poetry.lock to fully define the explainer environment. Install poetry following official documentationarrow-up-right. Usually this goes down to

Train Outlier Detector

Prepare Training Environment

We are going to use pyproject.toml and poetry.lock files from Alibi Detect Serverarrow-up-right. This will allow us to create environment that will match the runtime one.

Currently, the server's pyproject.toml is structured in the way that it uses a locally present source code of seldon-core.

Please, make sure that you obtain the source code that match the version of used alibi-detect-server.

Prepare Training Script

Deploy Cifar10 model and Outlier Detector

Note, this requires Knative. Follow Knative documentationarrow-up-right to install it.

Deploy Event Display

Deploy Model

Create Knative Broker, Trigger and Kservice

Test it!

In a terminal follow logs of the event-display deployment with for example

Now we were send two requests, one containing a normal image and one outlier.

Note: it may take a moment for the kservice to become available

png
png

Tear Down

Last updated

Was this helpful?