# 5.8. Log data drift test results to MLflow \[CODE PRACTICE]

{% embed url="<https://youtu.be/gluRb9TbWSE?si=2Bw77DLhy_AKS-gz>" %}

**Video 8**. [Log data drift test results to MLflow \[CODE PRACTICE\]](https://youtu.be/gluRb9TbWSE?si=2Bw77DLhy_AKS-gz), by Emeli Dral

In this video, we show how to log the results of data drift tests implemented with Evidently to Mlflow and view the results in the MLflow interface.

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

**Outline:**\
[00:00](https://www.youtube.com/watch?v=gluRb9TbWSE\&t=0s) Introduction\
[00:50](https://www.youtube.com/watch?v=gluRb9TbWSE\&t=50s) Start creating an MLflow script\
[01:48](https://www.youtube.com/watch?v=gluRb9TbWSE\&t=108s) Set up the database and preview the MLflow UI\
[03:10](https://www.youtube.com/watch?v=gluRb9TbWSE\&t=190s) Writing the Python script: overview and imports\
[04:24](https://www.youtube.com/watch?v=gluRb9TbWSE\&t=264s) Writing the Python script: set experiments\
[08:03](https://www.youtube.com/watch?v=gluRb9TbWSE\&t=483s) Writing the Python script: log parameters and reports\
[10:15](https://www.youtube.com/watch?v=gluRb9TbWSE\&t=615s) Run the script and view the results\
[13:30](https://www.youtube.com/watch?v=gluRb9TbWSE\&t=810s) Run a new experiment to log HTML reports\
[16:27](https://www.youtube.com/watch?v=gluRb9TbWSE\&t=987s) Next module focus

## Enjoyed the content?

Star Evidently on GitHub to contribute back! This helps us create free, open-source tools and content for the community.

⭐️ [Star](https://github.com/evidentlyai/evidently) on GitHub!


---

# 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/log-data-drift-test-results-mlflow-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.
