# Drift Detection with WhyLabs

***

## Overview

This example shows how to:

* Detect input data drift using WhyLabs
* Automate retraining pipelines upon drift detection
* Require human approval for retraining actions

{% hint style="info" %}
The example shows how to do drift detection with WhyLabs, but the same approach can be used with other drift detection tools.
{% endhint %}

***

### Steps

{% stepper %}
{% step %}
**Setup a Training pipeline**

Data is loaded from S3, preprocessed and saved as a Valohai dataset. Then using YOLO a model is trained and saved to Valohai
{% endstep %}

{% step %}
**Setup a Drift Detection pipeline**

Setup the pipeline for inference and log data to WhyLabs in order to detect drift.
{% endstep %}

{% step %}
**Configure notifications for Approvals**

As part of the drift detection pipeline you can include a notification and approval step to start a retraining of the model.
{% endstep %}
{% endstepper %}

***

### GitHub repository

The repository walks you through the steps above:

{% embed url="<https://github.com/valohai/drift-detection-example>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valohai.com/project-gallery/monitoring-and-drift-detection/drift-detection-example.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
