How satyaifd/mlops-governance-reference works
This monorepo is a reference MLOps platform spanning batch fraud classification, fair-lending loan underwriting, and stateful AML stream detection. The main user-facing workflow is a loan application entering the prediction API, receiving a risk recommendation and governance routing, with inference telemetry recorded for monitoring. Separate branches cover model-data preparation and training, fraud-model lifecycle capabilities, AML event processing and DLQ replay, and shared compliance controls. The README documents capabilities beyond the excerpts; edges for unsampled or indirect wiring are omitted rather than inferred.
Main entry points: main.py Loan Prediction API · pipeline.py Stream Pipeline · replay_dlq.py DLQ Replay · ingestion.py Loan Data Ingestion
Components 27
Batch Fraud
- Fraud Ingestion
project-1-credit-card-fraud/src/ingestion/ingestion.py - Fraud Training
project-1-credit-card-fraud/src/training/train.py - Fraud Inference
project-1-credit-card-fraud/src/inference/main.py - Segment Auditing
project-1-credit-card-fraud/src/governance/audit.py - PSI Drift Checks
project-1-credit-card-fraud/src/validation/drift_check.py - Fraud Observability
project-1-credit-card-fraud/src/monitoring/observability.py
Loan Underwriting
- Loan Prediction API
project-2-loan-default/src/inference/main.py - Loan Data Ingestion
project-2-loan-default/src/ingestion/ingestion.py - Loan Data Extractor
project-2-loan-default/src/ingestion/extract.py - Loan Schema Contract
project-2-loan-default/src/ingestion/schemas.py - Fair-Lending Training
project-2-loan-default/src/training/train.py - Model Evaluation
project-2-loan-default/src/evaluation/evaluate.py - Drift Monitoring
project-2-loan-default/src/monitoring/drift_monitor.py - Traffic Generation
project-2-loan-default/src/monitoring/generate_traffic.py - Inference Telemetry
project-2-loan-default/src/monitoring/observability.py - Drift Validation
project-2-loan-default/src/validation/drift_check.py - Underwriting Workflow
airflow/dags/loan_underwriting_dag.py
AML Streaming
- Transaction Generator
project-3-aml-streaming/src/streaming/generator.py - Event Validation
project-3-aml-streaming/src/ingestion/stream_ingestor.py - Velocity Features
project-3-aml-streaming/src/features/velocity.py - Anomaly Detector
project-3-aml-streaming/src/models/anomaly_detector.py - Stream Pipeline
project-3-aml-streaming/src/streaming/pipeline.py - DLQ Replay
project-3-aml-streaming/scripts/replay_dlq.py
Governance Controls
- HITL Decision Router
compliance/eu_ai_act_hitl_router.py - Inference Circuit Breaker
compliance/dora_circuit_breaker.py - GDPR Erasure
compliance/gdpr_purge.py
Other components
- Applicant
Connections 19
- Applicant → Loan Prediction API: submits application
README.md - Loan Prediction API → HITL Decision Router: routes decision
project-2-loan-default/src/inference/main.py - Loan Prediction API → Inference Circuit Breaker: guards inference
project-2-loan-default/src/inference/main.py - Loan Prediction API → Inference Telemetry: logs transaction
project-2-loan-default/src/inference/main.py - Loan Data Ingestion → Loan Data Extractor: fetches data
project-2-loan-default/src/ingestion/ingestion.py - Loan Data Ingestion → Loan Schema Contract: validates against
project-2-loan-default/src/ingestion/ingestion.py - Underwriting Workflow → Loan Data Ingestion: coordinates
- Loan Prediction API → Drift Monitoring: emits telemetry
project-2-loan-default/src/monitoring/drift_monitor.py - Traffic Generation → Inference Telemetry: creates telemetry
project-2-loan-default/src/monitoring/generate_traffic.py - Drift Validation → Inference Telemetry: reports drift
project-2-loan-default/src/validation/drift_check.py - Stream Pipeline → Transaction Generator: reads events
project-3-aml-streaming/src/streaming/pipeline.py - Stream Pipeline → Event Validation: validates events
project-3-aml-streaming/src/streaming/pipeline.py - Stream Pipeline → Velocity Features: computes features
project-3-aml-streaming/src/streaming/pipeline.py - Stream Pipeline → Anomaly Detector: scores events
project-3-aml-streaming/src/streaming/pipeline.py - DLQ Replay → Event Validation: replays events
project-3-aml-streaming/scripts/replay_dlq.py - DLQ Replay → Velocity Features: replays events
project-3-aml-streaming/scripts/replay_dlq.py - DLQ Replay → Anomaly Detector: replays events
project-3-aml-streaming/scripts/replay_dlq.py - DLQ Replay → Transaction Generator: reads source stream
project-3-aml-streaming/scripts/replay_dlq.py - Fraud Inference → Segment Auditing: audits decisions