Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


๐Ÿš— Vehicle Insurance Claim Prediction MLOps Platform

An end-to-end Production-Ready MLOps Pipeline built using Python, MongoDB, AWS, Docker, GitHub Actions, CI/CD, and Machine Learning that automates the complete lifecycle from data ingestion to cloud deployment.


๐Ÿ“Œ Project Overview

Traditional Machine Learning projects usually end after training a model.

This project goes several steps further by implementing a complete production-grade MLOps architecture capable of:

  • Automated Data Ingestion
  • Data Validation
  • Feature Engineering
  • Model Training
  • Model Evaluation
  • Model Registry
  • Model Versioning
  • Cloud Storage
  • Prediction Pipeline
  • Docker Containerization
  • Continuous Integration
  • Continuous Deployment
  • AWS Cloud Deployment

The entire workflow is designed following modular software engineering practices, making the project scalable, maintainable, and production-ready.


๐Ÿ— Complete Architecture

MongoDB Atlas
       โ”‚
       โ–ผ
Data Ingestion
       โ”‚
       โ–ผ
Data Validation
       โ”‚
       โ–ผ
Data Transformation
       โ”‚
       โ–ผ
Model Training
       โ”‚
       โ–ผ
Model Evaluation
       โ”‚
       โ–ผ
Model Registry (AWS S3)
       โ”‚
       โ–ผ
Prediction Pipeline
       โ”‚
       โ–ผ
Flask Web App
       โ”‚
       โ–ผ
Docker Container
       โ”‚
       โ–ผ
GitHub Actions
       โ”‚
       โ–ผ
AWS EC2 Deployment

โœจ Key Features

๐Ÿ“ฅ Data Ingestion

  • Fetches dataset directly from MongoDB Atlas
  • Converts MongoDB documents into Pandas DataFrame
  • Creates train-test split automatically
  • Stores artifacts for downstream pipeline

โœ… Data Validation

  • Schema Validation
  • Missing Value Validation
  • Data Drift Detection
  • Column Validation
  • Numerical Feature Validation
  • Categorical Feature Validation

๐Ÿ”„ Data Transformation

  • Feature Engineering
  • Missing Value Imputation
  • Feature Scaling
  • Encoding
  • Pipeline Serialization
  • Transformation Object Saving

๐Ÿค– Model Training

Multiple algorithms can be trained and compared.

Supports:

  • Random Forest
  • Gradient Boosting
  • XGBoost
  • CatBoost
  • Extra Trees
  • Decision Tree
  • AdaBoost
  • Linear Models

Automatic Best Model Selection based on evaluation metrics.


๐Ÿ“Š Model Evaluation

Instead of replacing models blindly,

the project:

  • Downloads previous production model
  • Compares new model performance
  • Uses Threshold Based Validation
  • Registers model only if performance improves

This mimics a real production ML workflow.


โ˜ AWS Model Registry

Models are automatically:

  • Uploaded to AWS S3
  • Version Controlled
  • Retrieved during prediction
  • Managed without manual intervention

๐Ÿ”ฎ Prediction Pipeline

Production prediction pipeline supports:

  • Single Prediction
  • Batch Prediction
  • Real-time Inference

๐ŸŒ Flask Web Application

Interactive web interface allowing users to

  • Upload input
  • Predict Insurance Claim
  • Trigger Training Pipeline
  • View Prediction Results

๐Ÿณ Dockerized Deployment

Entire application is containerized using Docker ensuring

  • Environment consistency
  • Easy deployment
  • Platform independence

โš™ CI/CD Pipeline

Fully automated deployment using

GitHub Actions

Workflow:

Code Push
     โ”‚
     โ–ผ
GitHub Actions
     โ”‚
     โ–ผ
Build Docker Image
     โ”‚
     โ–ผ
Push Image to AWS ECR
     โ”‚
     โ–ผ
Deploy on EC2
     โ”‚
     โ–ผ
Updated Application

No manual deployment required.


๐Ÿ›  Tech Stack

Programming

  • Python
  • HTML
  • CSS

Machine Learning

  • Scikit-Learn
  • Pandas
  • NumPy

Database

  • MongoDB Atlas

Cloud

  • AWS EC2
  • AWS S3
  • AWS ECR
  • AWS IAM

MLOps

  • Docker
  • GitHub Actions
  • CI/CD
  • Model Registry
  • Environment Variables
  • Logging
  • Exception Handling

Backend

  • Flask

Version Control

  • Git
  • GitHub

๐Ÿ“‚ Project Structure

Vehicle-Insurance-Project/

โ”‚
โ”œโ”€โ”€ artifacts/
โ”œโ”€โ”€ notebooks/
โ”œโ”€โ”€ src/
โ”‚
โ”œโ”€โ”€ components/
โ”‚     โ”œโ”€โ”€ Data Ingestion
โ”‚     โ”œโ”€โ”€ Data Validation
โ”‚     โ”œโ”€โ”€ Data Transformation
โ”‚     โ”œโ”€โ”€ Model Trainer
โ”‚     โ”œโ”€โ”€ Model Evaluation
โ”‚     โ”œโ”€โ”€ Model Pusher
โ”‚
โ”œโ”€โ”€ configuration/
โ”œโ”€โ”€ constants/
โ”œโ”€โ”€ entity/
โ”œโ”€โ”€ pipeline/
โ”œโ”€โ”€ aws_storage/
โ”œโ”€โ”€ utils/
โ”‚
โ”œโ”€โ”€ static/
โ”œโ”€โ”€ templates/
โ”‚
โ”œโ”€โ”€ app.py
โ”œโ”€โ”€ demo.py
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

โš™ Pipeline Workflow

MongoDB
   โ”‚
   โ–ผ
Data Ingestion
   โ”‚
   โ–ผ
Data Validation
   โ”‚
   โ–ผ
Data Transformation
   โ”‚
   โ–ผ
Model Trainer
   โ”‚
   โ–ผ
Model Evaluation
   โ”‚
   โ–ผ
AWS S3 Model Registry
   โ”‚
   โ–ผ
Prediction Pipeline

๐Ÿ” Environment Variables

Required environment variables

MONGODB_URL

AWS_ACCESS_KEY_ID

AWS_SECRET_ACCESS_KEY

AWS_DEFAULT_REGION

ECR_REPO

โ˜ AWS Services Used

  • IAM
  • EC2
  • S3
  • ECR

๐Ÿณ Deployment Pipeline

Developer

โ†“

GitHub Repository

โ†“

GitHub Actions

โ†“

Docker Build

โ†“

Push Docker Image

โ†“

AWS ECR

โ†“

EC2 Pulls Latest Image

โ†“

Application Deployment

๐Ÿš€ How to Run

Clone Repository

git clone <repo_url>

Create Environment

conda create -n vehicle python=3.10

conda activate vehicle

Install Dependencies

pip install -r requirements.txt

Run Training

python demo.py

Run Application

python app.py

๐Ÿ“ˆ Engineering Highlights

โœ” Modular Pipeline Architecture

โœ” Production-ready Folder Structure

โœ” Config Driven Development

โœ” Artifact Based Pipeline

โœ” Object-Oriented Design

โœ” Cloud Model Registry

โœ” Automatic Model Comparison

โœ” Automated Deployment

โœ” Logging System

โœ” Custom Exception Handling

โœ” Dockerized Infrastructure

โœ” Continuous Integration

โœ” Continuous Deployment

โœ” AWS Cloud Deployment

โœ” Environment Variable Management


๐Ÿ“š Software Engineering Concepts Demonstrated

  • Clean Code Principles
  • Modular Architecture
  • Separation of Concerns
  • Dependency Management
  • Configuration Management
  • Pipeline Design Pattern
  • Artifact Management
  • Model Versioning
  • Cloud Integration
  • CI/CD Automation
  • Containerization
  • Production Deployment

๐ŸŽฏ Recruiter Highlights

This project demonstrates hands-on experience with:

Category Skills Demonstrated
Machine Learning End-to-End ML Pipeline
MLOps Production Workflow
Backend Flask
Cloud AWS (EC2, S3, ECR, IAM)
Database MongoDB Atlas
DevOps Docker, GitHub Actions
CI/CD Automated Deployment
Software Engineering OOP, Modular Design, Logging, Exception Handling

๐Ÿ‘จโ€๐Ÿ’ป Author

Ayush

Aspiring Machine Learning Engineer | MLOps Engineer

Focused on building production-grade AI systems using Machine Learning, Cloud Computing, and DevOps practices.


About

First project of mllops learning

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages