An open API service indexing awesome lists of open source software.

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.

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

---
![API Predictiver](./statics/postman.png)
---

## 🧰 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 |

![Feature Selection](./statics/feature_selection.png)
---
## πŸ—οΈ 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

![Mlflow & BentoML](./statics/api.png)
---

## πŸ”„ 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 inputs

Visualized via **Grafana dashboards**. **(CLICK ON THE IMAGE BELOW TO WATCH THE VIDEO)**

[![Dashboard Preview](./statics/grafana_preview.png)](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
````
![Makefile](./statics/makefile.png)
---

## πŸ”’ 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.”*

---

![MLflow](./statics/mlflow.png)