A production-ready MLOps system that detects concept drift in machine learning models through real-time statistical performance comparison. Built with FastAPI, Streamlit, and scikit-learn.
- Real-time Drift Detection: Statistical comparison using PSI (Population Stability Index) and KS tests
- Fast Inference: <500ms prediction latency
- Configurable Alerts: 15% threshold with Discord webhook integration
- Interactive Dashboard: Streamlit dashboard with Plotly visualizations
- Async Logging: Non-blocking prediction logging to SQLite
- Docker Support: Containerized deployment
- CI/CD: Automated testing via GitHub Actions
- Zero-cost Deployment: Ready for Render (API) and Hugging Face Spaces (Dashboard)
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Client βββββΆβ FastAPI βββββΆβ SQLite β
β (curl/app) β β Inference β β Database β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ βββββββββββββββ ββββββββββββββββ
β Drift β β Streamlit β β Discord β
β Detector βββββΆβ Dashboard βββββΆβ Webhook β
ββββββββββββββββ βββββββββββββββ ββββββββββββββββ
Open your terminal/command prompt and run:
git clone https://github.com/YOUR_USERNAME/mlops-drift-detector.git
cd mlops-drift-detector
" π‘ Pro Tip: If you don't see "Open in Terminal" when right-clicking a folder, click 2-3 times until it appears. "
pip install -r requirements.txtcd app
python model.py
cd ..- Open two separate terminals
- terminal1: FastAPI Server:
uvicorn app.main:app --reload --port 8000- Terminal 2: Streamlit Dashboard
streamlit run dashboard/app.pyAPI: http://localhost:8000 API Docs: http://localhost:8000/docs Dashboard: http://localhost:8501
Made by predictivemanish