More information here: homework.md. Please also give us feedback for this week videos using this form
Did you take notes? Add them here:
- Week 5 notes by M. Ayoub C.
- week 5: Monitoring notes Ayoub.B
- 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
) - Install required packages
pip install -r requirements.txt
- Run
python prepare.py
for downloading datasets
To start all required services, execute:
docker-compose up
It will start following services:
prometheus
- TSDB for metricsgrafana
- Visual tool for metricsmongo
- MongoDB, for storing raw data, predictions, targets and profile reportsevidently_service
- Evindently RT-monitoring service (draft example)prediction_service
- main service, which makes predictions
To start sending data to service, execute:
python send_data.py
This script will send every second single row from dataset to prediction service along with creating file target.csv
with actual results (so it can be loaded after)
After you stop sending data to service, you can run batch monitoring pipeline (using Prefect) by running script:
python prefect_example.py
This script will:
- load
target.csv
to MongoDB - download dataset from MongoDB
- Run Evidently Model Profile and Evidently Report on this data
- Save Profile data back to MongoDB
- Save Report to
evidently_report_example.html
You can look at Prefect steps in Prefect Orion UI
(to start it execute prefect orion start
)