How assazzin-01/mena-mlops-project works
This repository implements an Arabic sentiment MLOps system: it prepares versioned datasets, trains and evaluates AraBERT models, serves predictions, and supports monitoring, human review, and gated retraining. The main feedback loop runs from uncertain predictions through review and candidate training to quality-gated promotion. README statements establish several system-level connections; source excerpts and the SOURCE INDEX establish selected internal calls. Other links, especially deployment wiring, are omitted where the evidence does not show them.
Main entry points: app.py Prediction API · train.py AraBERT training · streaming.py Stream consumer · quality_gate.py Promotion gate
Components 21
Data preparation
- Review sources
- Data pipeline
src/mena_mlops/data_pipeline.py - Training data
src/mena_mlops/training/data.py
Training and quality
- AraBERT training
src/mena_mlops/training/train.py - Model evaluation
src/mena_mlops/training/evaluation.py - Training quality
src/mena_mlops/quality.py - Promotion gate
src/mena_mlops/deployment/quality_gate.py
Serving and inference
- Canary rollout
src/mena_mlops/deployment/canary.py - Prediction API
src/mena_mlops/serving/app.py - Bento service
src/mena_mlops/serving/bento_service.py - Batch inference
src/mena_mlops/inference/batch.py - Stream consumer
src/mena_mlops/inference/streaming.py - Redis Streams
Monitoring and optimization
- Drift reports
src/mena_mlops/monitoring/drift.py - PSI calculation
src/mena_mlops/monitoring/psi.py - Model optimization
src/mena_mlops/optimization.py - Load testing
src/mena_mlops/load_testing.py - Prometheus and Grafana
Feedback and retraining
- Feedback store
src/mena_mlops/feedback.py - Human reviewer
- Candidate retraining
src/mena_mlops/training/train.py
Connections 21
- Review sources → Data pipeline: downloads and processes
README.md - Data pipeline → Training data: produces splits
README.md - Training data → AraBERT training: loads splits
src/mena_mlops/training/train.py - AraBERT training → Model evaluation: evaluates predictions
src/mena_mlops/training/train.py - AraBERT training → Training quality: checks metrics
README.md - Training quality → Promotion gate: candidate eligibility
README.md - Promotion gate → Canary rollout: promotes candidate
- Canary rollout → Prediction API: routes traffic
README.md - Prediction API → Batch inference: serves predictions for
scripts/run_batch_inference.py - Redis Streams → Stream consumer: provides events
README.md - Stream consumer → Redis Streams: publishes predictions
README.md - Stream consumer → Feedback store: persists uncertain predictions
src/mena_mlops/inference/streaming.py - Human reviewer → Feedback store: reviews labels
README.md - Feedback store → Candidate retraining: exports reviewed data
README.md - Candidate retraining → Promotion gate: gates candidate
README.md - Drift reports → PSI calculation: calculates PSI
src/mena_mlops/monitoring/drift.py - Drift reports → Prometheus and Grafana: exports PSI metrics
README.md - Prediction API → Prometheus and Grafana: exposes metrics
README.md - Model optimization → Prediction API: provides ONNX inference
src/mena_mlops/serving/app.py - Load testing → Prediction API: tests service load
README.md - Bento service → Prediction API: reuses predictor
src/mena_mlops/serving/bento_service.py