https://github.com/abdiasarsene/routerwise-server-predictive-analytics-for-shipments
RouterWise is a production-grade, modular MLOps pipeline built to optimize supply chains in the sensitive and prestigious art logistics sector. It is the intelligent backend of the upcoming PrecisioArt platform (Django-based), and delivers predictive insights and smart routing through a fully automated, monitored, and versioned ML lifecycle.
https://github.com/abdiasarsene/routerwise-server-predictive-analytics-for-shipments
bentoml catboost mlflow prometheus scikit-learn shap
Last synced: 2 months ago
JSON representation
RouterWise is a production-grade, modular MLOps pipeline built to optimize supply chains in the sensitive and prestigious art logistics sector. It is the intelligent backend of the upcoming PrecisioArt platform (Django-based), and delivers predictive insights and smart routing through a fully automated, monitored, and versioned ML lifecycle.
- Host: GitHub
- URL: https://github.com/abdiasarsene/routerwise-server-predictive-analytics-for-shipments
- Owner: Abdiasarsene
- Created: 2025-06-06T19:07:04.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-06-12T05:39:30.000Z (4 months ago)
- Last Synced: 2025-06-12T06:27:14.242Z (4 months ago)
- Topics: bentoml, catboost, mlflow, prometheus, scikit-learn, shap
- Language: Jupyter Notebook
- Homepage:
- Size: 7.89 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π― RouterWise β ML-Powered Logistics Optimization for Art Handling
RouterWise is a production-grade, modular MLOps pipeline built to optimize supply chains in the **sensitive and prestigious art logistics sector**. It is the intelligent backend of the upcoming `PrecisioArt` platform (Django-based), and delivers predictive insights and smart routing through a fully automated, monitored, and versioned ML lifecycle.
---
## π§ Project Purpose
Designed for high-value and highly constrained logistics workflows, this pipeline ensures:
- Predictive analytics for routing and optimization
- Clean, auditable MLOps with Continuous Training (CT)
- Modular, production-first codebase for scalability---

---## π§° Tech Stack
| Area | Tools & Frameworks |
|-----------------------|------------------------------------------------------------------|
| Data Versioning | DVC |
| Feature Selection | CatBoostEncoder, RobustScaler, VarianceThreshold, ChiΒ², RFE |
| Modeling | Scikit-learn, CatBoost, Pipelines |
| Experiment Tracking | MLflow (local & remote registry) |
| Model Packaging | BentoML |
| API Serving | FastAPI (RouterWise module) integrated with PrecisioArt (Django)|
| CI/CD | Jenkins, Makefile |
| Monitoring | Prometheus + Grafana |
| Testing | Pytest |
| Containerization | Docker, docker-compose |
| Retraining | `retrain/` (upcoming), Celery + Beat |
---
## ποΈ Modular Project Architecture```
routerwise/
β
βββ app/ # FastAPI app for serving predictions (BentoML runtime)
βββ train\_pipeline/ # Feature engineering, training, inference, model saving
βββ retrain/ # (WIP) Scheduled retraining logic with Celery + Beat
βββ notebook/ # EDA and feature selection experiments
βββ docker/ # Custom Dockerfiles
βββ tests/ # Unit/integration test suites
βββ Jenkinsfile # CI/CD pipeline config
βββ Makefile # Unified entrypoint for all tasks
βββ dataset.dvc # DVC-tracked dataset pointer
βββ README.md````
---
## π MLOps Workflow
1. **Data versioning** using `DVC`
2. **Advanced feature engineering** with:
- `CatBoostEncoder`, `RobustScaler`
- `VarianceThreshold`, `ChiΒ²`, `RandomForest`, `RFE`
3. **Training pipeline**:
- Modular `sklearn` pipelines
- Auto-logging to `MLflow`
4. **Model registration**:
- Best model pushed to `MLflow Registry`
5. **Packaging and serving**:
- Packaged using `BentoML`
- Served via `FastAPI` (`app/`) β integrated with Django project `PrecisioArt`
6. **Monitoring & observability**:
- Prometheus metrics collection
- Grafana dashboards for API health, latency, drift, etc.
7. **Testing & validation**:
- Unit and integration tests for both training and serving
8. **CI/CD**:
- Automated with `Jenkinsfile`, lint/test/build/deploy
---## π Continuous Training Strategy (Planned)
A `retrain/` module is planned for scheduled model updates using **Celery + Beat**.
Key points:
- New data triggers a scheduled pipeline
- Retrained model is **compared** to the currently deployed one
- **Only if the new model outperforms** the current one will it be promoted
- Else, the system retains the existing model---
## π Monitoring Capabilities
Deployed metrics collected in real time:
- API latency, health, uptime (Prometheus)
- Request counts, error rates
- Drift detection on incoming data streams
- Data quality checks on inputsVisualized via **Grafana dashboards**. **(CLICK ON THE IMAGE BELOW TO WATCH THE VIDEO)**
[](https://drive.google.com/file/d/1uD0oQKDrmADOqS0NHQR6PEfOGW2Jhqwu/view?usp=drive_link)
---
## β CI/CD Pipeline
All components integrated into a production-grade `Jenkinsfile`:
- β Unit tests
- β Lint checks
- β Build Docker image
- β Trigger MLflow or BentoML packaging
- β Optional deploy phase
- β Slack/Webhook notifications (optional)---
## βοΈ Makefile Commands
```bash
make train # Train and log with MLflow
make test # Run test suite
make run # Launch BentoML API server
make deploy # Build + push containers
make monitoring # Start Prometheus + Grafana stack
make format # Run flake8 or ruff
````

---## π Reproducibility & Integrity
* Reproducible pipelines with versioned datasets (`DVC`)
* Isolated & dockerized environments
* Centralized logging via `MLflow`
* Strict test coverage
* Modular architecture for easy refactor or integration---
## π Status
* β Training pipeline complete
* β Feature selection logic optimized
* β API (RouterWise) deployed via BentoML
* β Monitoring dashboards active
* π Continuous Training module (`retrain/`) in progress---
## π€ Contribution
This is not a starter project, but an evolving production-grade pipeline.
---## π About
Built by **Abdias Arsène**, IT Consultant in AI & MLOps
Focused on real-world, cross-industry ML solutions (Health, Humanitarian, Finance, Art Logistics)> *βI don't write code to run. I write code to endure.β*
---
