Note: in this video we use Prefect (07:33-11:21). Feel free to skip this part. Also note that Prefect is not officially supported in the 2024 edition of the course.
More information here
Did you take notes? Add them here:
- Week 5 notes by M. Ayoub C.
- week 5: Monitoring notes Ayoub.B
- Week 5: 2023
- Week5: Why we need to monitor models after deployment? by Hongfan (Amber)
- Send a PR, add your notes above this line
You need following tools installed:
docker
docker-compose
(included to Docker Desktop for Mac and Docker Desktop for Windows )
Note: all actions expected to be executed in repo folder.
- Create virtual environment and activate it (eg.
python -m venv venv && source ./venv/bin/activate
orconda create -n venv python=3.11 && conda activate venv
) - Install required packages
pip install -r requirements.txt
- Run
baseline_model_nyc_taxi_data.ipynb
for downloading datasets, training model and creating reference dataset
To start all required services, execute:
docker-compose up
It will start following services:
db
- PostgreSQL, for storing metrics dataadminer
- database management toolgrafana
- Visual dashboarding tool
To calculate evidently metrics with prefect and send them to database, execute:
python evidently_metrics_calculation.py
This script will simulate batch monitoring. Every 10 seconds it will collect data for a daily batch, calculate metrics and insert them into database. This metrics will be available in Grafana in preconfigured dashboard.
-
In your browser go to a
localhost:3000
The default username and password areadmin
-
Then navigate to
General/Home
menu and click onHome
. -
In the folder
General
you will seeNew Dashboard
. Click on it to access preconfigured dashboard.
Run debugging_nyc_taxi_data.ipynb
to see how you can perform a debugging with help of Evidently TestSuites
and Reports
To stop all services, execute:
docker-compose down