# 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
