How bhavesh2205/mlops-vehicle-insurance-claim-prediction works
Project type and purpose
• This is an enterprise‑grade MLOps solution for vehicle insurance claim prediction.
• It implements a full ML lifecycle: data ingestion from MongoDB Atlas, validation, transformation, model training/evaluation, and automated deployment.
• It exposes a FastAPI‑based UI for predictions and training triggers, backed by AWS services (S3, ECR, EC2) and CI/CD via GitHub Actions.
File structure
• Top‑level:
• app.py – FastAPI web server handling UI routes and prediction/training endpoints
• run_pipeline.py / push_data.py – scripts to execute ML pipelines or push data
• Dockerfile / .github/workflows/ci-cd.yaml – containerization and CI/CD config
• analysis/ – exploratory data analysis notebooks and scripts
• schema/ – data schema definition for validation
• src/
• cloud_storage/aws_storage.py – S3 interactions (model registry)
• configuration/ – AWS and MongoDB connection setup
• data_access/fetch_data.py – reading raw data from MongoDB Atlas
• components/ – modular pipeline steps (ingestion, validation, transformation, training, evaluation, pusher)
• pipeline/ – orchestrators for training and prediction pipelines
• entity/exception/logging/utils/constants – support classes, custom errors, logger, constants
• static/, templates/ – front‑end assets (CSS, HTML) for the FastAPI UI
• tests/ – unit tests
README for additional insights
• Architecture uses AWS S3 as model registry, ECR for Docker images, EC2 for hosting.
• CI/CD workflow: build Docker image → push to ECR → deploy on EC2.
• Data pipeline components: ingestion → validation → transformation.
• Model pipeline components: training → evaluation → pusher.