How dhanuk8778-netizen/mlops-production-system works
This repository ships a satellite-segmentation model as an ONNX inference service, with quantization, drift monitoring, latency measurement, and health-gated blue/green deployment. The main workflow is model artifact → calibrated INT8 export and validation → serving predictions → class-distribution monitoring; a separate deployment path starts candidate servers and gates proxy cutover on health and smoke tests. Edges reflect README statements or shown source references/calls; unsampled serving integrations and infrastructure wiring are not expanded beyond documented behavior.
Main entry points: app.py Inference API · segmentation_unet_int8.onnx ONNX model artifact · psi.py PSI monitor · synthetic_data.py Synthetic tiles
Components 20
Model and data
- Synthetic tiles
src/model/synthetic_data.py - Segmentation U-Net
src/model/unet.py - Quick training
src/model/train_quick.py
Export and validation
- ONNX export
src/export/export_onnx.py - INT8 quantization
src/export/quantize.py - Quantization validation
src/export/validate_quantization.py
Inference and monitoring
- Baseline computation
src/monitoring/compute_baseline.py - PSI monitor
src/monitoring/psi.py - Drift simulation
src/monitoring/simulate_drift.py - Inference API
src/serving/app.py - Latency benchmark
src/serving/benchmark_latency.py - API load test
src/serving/load_test.py
Deployment
- Traffic proxy
src/deploy/proxy_app.py - Blue-green orchestrator
src/deploy/blue_green_deploy.py - Remote deployment
scripts/ec2_blue_green_remote.sh
Other components
- Inference client
- ONNX model artifact
models/segmentation_unet_int8.onnx - Drift baseline
models/drift_baseline.json - Traffic generator
- AWS EC2 / SSM
Connections 23
- Quick training → Synthetic tiles: trains on
src/model/train_quick.py - Quick training → Segmentation U-Net: trains
src/model/train_quick.py - ONNX export → Segmentation U-Net: exports
src/export/export_onnx.py - INT8 quantization → Synthetic tiles: calibrates with
src/export/quantize.py - INT8 quantization → ONNX model artifact: writes INT8
src/export/quantize.py - Quantization validation → Synthetic tiles: evaluates samples
src/export/validate_quantization.py - Quantization validation → ONNX model artifact: compares models
src/export/validate_quantization.py - Baseline computation → Synthetic tiles: samples
src/monitoring/compute_baseline.py - Baseline computation → PSI monitor: saves baseline via
src/monitoring/compute_baseline.py - Baseline computation → ONNX model artifact: runs inference on
src/monitoring/compute_baseline.py - PSI monitor → Drift baseline: loads and saves
src/monitoring/psi.py - Drift simulation → PSI monitor: simulates observations
src/monitoring/simulate_drift.py - Inference API → ONNX model artifact: loads and runs
src/serving/app.py - Inference API → PSI monitor: records predictions
src/serving/app.py - Inference client → Inference API: sends requests
README.md - Inference API → Inference client: returns predictions
README.md - Latency benchmark → ONNX model artifact: benchmarks
src/serving/benchmark_latency.py - API load test → Inference API: sends load
README.md - Blue-green orchestrator → Traffic proxy: switches target
src/deploy/blue_green_deploy.py - Blue-green orchestrator → Inference API: starts and health-checks
src/deploy/blue_green_deploy.py - Traffic generator → Traffic proxy: sends traffic
README.md - Blue-green orchestrator → Remote deployment: counterpart documented
README.md - Remote deployment → AWS EC2 / SSM: deploys via SSM
README.md