# 5.7. Run data drift and model quality checks in a Prefect pipeline \[OPTIONAL CODE PRACTICE]

{% embed url="<https://youtu.be/ltmxxGV7Syg?si=efDXFxZNHndSidVI>" %}

**Video 7**. [Run data drift and model quality checks in a Prefect pipeline \[OPTIONAL CODE PRACTICE\]](https://youtu.be/ltmxxGV7Syg?si=efDXFxZNHndSidVI), by Emeli Dral

In this video, we show how to automate the data or model quality checks implemented with the Evidently Python library using Prefect.

**Want to go straight to code?** Here is the [code example](https://github.com/evidentlyai/ml_observability_course/tree/main/module5/prefect_sequential_checks) to follow along.

**Outline:**\
[00:00](https://www.youtube.com/watch?v=ltmxxGV7Syg\&t=0s) Introduction\
[00:55](https://www.youtube.com/watch?v=ltmxxGV7Syg\&t=55s) Install the libraries\
[01:53](https://www.youtube.com/watch?v=ltmxxGV7Syg\&t=113s) Start creating a Prefect flow\
[03:58](https://www.youtube.com/watch?v=ltmxxGV7Syg\&t=238s) Create the flow structure\
[05:33](https://www.youtube.com/watch?v=ltmxxGV7Syg\&t=333s) Implement functions to load data and run test suites\
[11:12](https://www.youtube.com/watch?v=ltmxxGV7Syg\&t=672s) Run the Python script\
[13:09](https://www.youtube.com/watch?v=ltmxxGV7Syg\&t=789s) Implement the Prefect tasks and flow\
[15:36](https://www.youtube.com/watch?v=ltmxxGV7Syg\&t=936s) Run the flow and view it in Prefect UI


---

# 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://learn.evidentlyai.com/ml-observability-course/module-5-ml-pipelines-validation-and-testing/data-drift-model-quality-checks-prefect-code-practice.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.
