MLOps · 2025
MLOps Pipeline for Vehicle Insurance
End-to-end MLOps pipeline with automated CI/CD, a cloud model registry and a deployed inference API.
- MLOps
- Docker
- AWS
- FastAPI
- MongoDB
The problem
Cross-sell prediction: given a customer who already holds one insurance product, estimate whether they would be interested in vehicle insurance. The modelling task itself is a fairly standard binary classification over twelve features — the substance of this project is everything around the model rather than the model itself.
Why the pipeline is the point
A notebook that produces a good score is not a deployed system. The gap between the two is where most machine learning work actually fails: there is no reproducible path from raw data to a served prediction, no record of which model is live, and no way to ship a new one without manual steps that eventually go wrong.
This project was built to close that gap end to end — ingestion, validation, transformation, training, evaluation and deployment as discrete, individually testable stages, each with defined inputs and outputs rather than one long script.
Architecture
- Data ingestion pulls from MongoDB Atlas, keeping raw storage separate from the training pipeline.
- Schema-driven validation checks incoming data against an expected contract before anything downstream trusts it — the cheapest possible place to catch a malformed feed.
- Trained model artifacts are versioned into an S3 model registry rather than living beside the code, so the deployed model is an explicit, retrievable choice.
- A FastAPI service loads from that registry and serves predictions over HTTP.
- GitHub Actions builds a Docker image, pushes it to AWS ECR and deploys to EC2 — so shipping a model is a git push, not a checklist.