MLOps Guide: MLFlow, DVC & Evidently
Shows how to combine MLFlow, DVC, and Evidently for experiment tracking, data versioning, and model monitoring in a Python project.
What this file does
Shows how to combine MLFlow, DVC, and Evidently for experiment tracking, data versioning, and model monitoring in a Python project.
When to use it
- You want to track ML experiments with MLFlow
- You need to version large datasets with DVC
- You want to monitor model drift with Evidently
- You are setting up a reproducible ML pipeline
Assumes this stack
MLOps Guide: MLFlow, DVC & Evidently
Quick guide for experiment tracking, data versioning, and model monitoring in VibeCheck.
Setup
poetry install # Installs mlflow, dvc, evidently
MLFlow - Experiment Tracking
Track parameters and metrics for embedding generation and vibe mapping.
Quick Start
# Initialize and start UI
poetry run python scripts/init_mlflow.py
mlflow ui --port 5000
# Or use Docker (production)
docker-compose -f docker-compose.mlflow.yml up -d
Access at http://localhost:5000
Usage
from vibecheck.embeddings import EmbeddingGenerator
from vibecheck.mlflow_config import init_mlflow
init_mlflow()
generator = EmbeddingGenerator(use_mlflow=True)
embeddings, ids = generator.generate_all(run_name="experiment_v1")
Tracked Experiments:
vibecheck-embeddings: Model names, dimensions, success rate, image coveragevibecheck-vibe-mapping: UMAP/HDBSCAN params, cluster count, cluster statistics
DVC - Data Version Control
Track large files (images, embeddings) and create reproducible pipelines.
Track Data
dvc add data/images/sample_images
dvc add data/embeddings/vibe_embeddings.npy
git add data/**/*.dvc .dvc/
git commit -m "Track data with DVC"
# Configure remote storage (optional)
dvc remote add -d s3remote s3://my-bucket/dvc-storage
dvc push
Run Pipeline
Pipeline defined in dvc.yaml, parameters in params.yaml.
dvc repro # Run full pipeline
dvc dag # View pipeline structure
dvc metrics show # Show metrics
dvc metrics diff # Compare with previous run
Experiment with Parameters
vim params.yaml # Edit parameters
dvc repro # Rerun pipeline
dvc metrics diff # Compare results
Evidently - Model Monitoring
Monitor embedding drift, data quality, and recommendation performance.
Generate Reports
poetry run python scripts/generate_monitoring_report.py
# Reports saved to monitoring/reports/
Usage in Code
from vibecheck.monitoring import EvidentlyMonitor
monitor = EvidentlyMonitor()
report_path = monitor.create_embedding_drift_report(
reference_embeddings=baseline_embeddings,
current_embeddings=new_embeddings,
reference_ids=baseline_ids,
current_ids=new_ids
)
Complete Workflow
# 1. Start MLFlow
poetry run python scripts/init_mlflow.py
mlflow ui --port 5000 &
# 2. Run pipeline with tracking
dvc repro
# 3. Track results with DVC
dvc add data/embeddings/*.npy
git add data/**/*.dvc
git commit -m "Update embeddings"
dvc push
# 4. Generate monitoring reports
poetry run python scripts/generate_monitoring_report.py
# 5. View results
# - MLFlow UI: http://localhost:5000
# - Evidently: open monitoring/reports/*.html
Configuration Files
mlflow.ini- MLFlow server configdocker-compose.mlflow.yml- Docker setupdvc.yaml- Pipeline definitionparams.yaml- Pipeline parameters.dvc/config- DVC remote storage
Troubleshooting
MLFlow not connecting:
python -c "import mlflow; print(mlflow.get_tracking_uri())"
# Should show: http://localhost:5000
DVC remote issues:
dvc remote list
dvc status
Monitoring reports fail:
# Ensure embeddings exist
ls -lh data/embeddings/
poetry run python scripts/generate_embeddings.py
What's inside
6 sections with setup, usage, workflow, config files, and troubleshooting plus code examples.
Change this for your project
- Replace
vibecheckwith your own package name in imports likefrom vibecheck.embeddings import EmbeddingGenerator - Replace
data/images/sample_imagesanddata/embeddings/vibe_embeddings.npywith your own data paths - Replace
s3://my-bucket/dvc-storagewith your actual DVC remote storage URI
Where it goes
Keep with your observability configuration. Describes what to track and alert on.
Worth borrowing
- Using a single
dvc reprocommand to run a full pipeline after editing parameters inparams.yaml - Combining MLFlow tracking with DVC versioning in one workflow script
Related Documents
youtube
Lists 39 YouTube videos scraped from a Hacker News thread, each with a thumbnail, link, and description excerpt.
Evaluation and Observability
Defines evaluation methodology, monitoring signals, and feedback loops for LLM applications in production.
🚀 Lovable AI & Cloud - Complete Setup Guide
Guides developers through setting up Lovable AI and Cloud, from account creation to production deployment and real-world implementations.
LLM Judge — Setup & Operations
Explains how to enable and configure a three-tier LLM judge cascade for prompt-injection detection, with shadow-mode rollout and golden-set calibration.