Installation¶
Requirements¶
- Python 3.9 or higher
- pip or poetry
Basic Installation¶
Install DriftWatch from PyPI:
This installs the core library with minimal dependencies:
numpy- Numerical computationspandas- Data manipulationscipy- Statistical functionspydantic- Data validation
Optional Dependencies¶
DriftWatch provides optional extras for specific use cases:
CLI Tools¶
For command-line interface with rich formatting:
Includes:
typer- CLI frameworkrich- Beautiful terminal output
FastAPI Integration¶
For automatic API monitoring:
Includes:
fastapi- Web frameworkuvicorn- ASGI server
Alerting¶
For Slack notifications and email alerts:
Includes:
httpx- HTTP client for webhooksaiosmtplib- Async SMTP client
MLflow Integration¶
For experiment tracking integration:
Includes:
mlflow- ML experiment tracking
All Features¶
Install everything:
Development Installation¶
For contributors:
# Clone the repository
git clone https://github.com/VincentCotella/DriftWatch.git
cd DriftWatch
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in editable mode with dev dependencies
pip install -e ".[dev,all]"
# Install pre-commit hooks
pre-commit install
Verify Installation¶
Test your installation:
Or run a quick check:
from driftwatch import Monitor
import pandas as pd
import numpy as np
# Create sample data
data = pd.DataFrame({
"age": np.random.normal(35, 10, 100),
"income": np.random.lognormal(10.5, 0.5, 100)
})
# Create monitor
monitor = Monitor(reference_data=data)
print("✓ DriftWatch installed successfully!")
Next Steps¶
- Quickstart → - Run your first drift check
- Core Concepts → - Understand how drift detection works