How kcmchandramouli/mlops-loan-approval works
This is a loan-approval prediction application with frontend, API, model-serving, and monitoring services. Its main user flow is applicant input through the frontend and API to model inference, returning an approval prediction; the API also records prediction events. A separate training and tracking lifecycle uses versioned data and MLflow, while monitoring compares reference data with production prediction data. The README documents the service and MLOps capabilities; some subsystem wiring is therefore shown only where explicitly documented, since not all source was sampled.
Main entry points: api/app.py Prediction API · monitoring/app.py Monitoring Service · model/app.py Model Service · inference.py Inference
Components 19
Prediction Serving
- Loan Form
frontend/app.py - Form Template
frontend/templates/index.html - Prediction API
api/app.py - Model Service
model/app.py - Inference
model/inference.py - Loan Decision
Training Lifecycle
- Raw Loan Data
data/raw - Train and Test Data
data/processed - Model Training
model/modelling_refactor.py
Monitoring and Audit
- Prediction Event Log
api/app.py - Cloud Logging
- BigQuery Predictions
- Reference Data
data/simulation/reference_data.csv.dvc - Monitoring Service
monitoring/app.py - Drift Reports
monitoring/evidently_profile.py
Versioning and Tracking
- Registered Model
model/model.pkl.dvc - DVC Storage
- MLflow Registry
Other components
- Applicant
Connections 23
- Applicant → Loan Form: enters features
- Loan Form → Form Template: renders form
- Form Template → Prediction API: submits request
- Prediction API → Model Service: forwards request
- Model Service → Inference: calls inference
- Inference → MLflow Registry: loads model
- Inference → Loan Decision: returns decision
- Model Service → Prediction API: returns result
- Prediction API → Loan Form: returns response
- Prediction API → Prediction Event Log: appends event
- Prediction API → Cloud Logging: emits logs
- Cloud Logging → BigQuery Predictions: stores audit data
- Raw Loan Data → Train and Test Data: prepared for training
- Train and Test Data → Model Training: trains from data
- Model Training → MLflow Registry: logs runs and model
- Model Training → Registered Model: saves model
- DVC Storage → Raw Loan Data: versions data
- DVC Storage → Train and Test Data: versions data
- DVC Storage → Reference Data: versions reference
- Monitoring Service → BigQuery Predictions: fetches current data
- Monitoring Service → Reference Data: loads reference
- Monitoring Service → Drift Reports: builds reports
- Drift Reports → Monitoring Service: returns drift results