Skip to content

ML system that Experiments, Tests, and Deploys itself From raw data to production predictions - completely automated.

Notifications You must be signed in to change notification settings

CodeBy-HP/Sentiment-Classification-Mlflow-DVC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

42 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽญ Sentiment Classification - MLOps Pipeline

Production-grade sentiment analysis with automated experimentation, testing, and deployment

Python MLflow FastAPI Docker DVC


๐ŸŽฏ Overview

End-to-end MLOps system for sentiment analysis featuring automated experimentation, intelligent model promotion, and cloud deployment.


๐ŸŒˆ User Interface

Screenshot 2025-12-17 155611

๐ŸŒˆ Video Demo

Watch Demo

โ–ถ๏ธ Click to watch demo


๐ŸŒˆ Architecture and Workflow Diagrams

Screenshot 2025-12-17 155305 Screenshot 2025-12-17 155321 Screenshot 2025-12-17 155355

โœจ Key Features

๐Ÿ”ฌ SYSTEMATIC EXPERIMENTATION

  • Tested multiple models with BoW and TF-IDF
  • Tracked all experiments using MLflow

๐Ÿ”„ AUTOMATED ML PIPELINE

  • End-to-end DVC pipeline for data โ†’ model
  • Fully reproducible with versioned parameters

๐ŸŽฏ SMART MODEL PROMOTION

  • Automatically promotes only high-quality models
  • Uses MLflow registry for staging and production

๐Ÿš€ COMPLETE CI/CD PIPELINE

  • Automated builds and deployments via GitHub Actions
  • Dockerized deployment on AWS EC2

๐Ÿงช COMPREHENSIVE TESTING

  • Validates model performance and API endpoints
  • Prevents faulty models from being deployed

๐ŸŒ PRODUCTION-READY APPLICATION

  • FastAPI app for real-time sentiment prediction
  • Clean UI with health and confidence checks

๐Ÿ› ๏ธ Tech Stack

  • Machine Learning: Pandas & NumPy, NLTK
  • Mlops Tools: MLflow, DVC, DagShub
  • Deployement & CICD: Docker, GitHub Actions, AWS (EC2, ECR) , FastAPI

๐Ÿ“ Project Structure

Sentiment-Classification/
โ”œโ”€โ”€ sentiment_classification/
โ”‚   โ”œโ”€โ”€ data/              # Data ingestion & preprocessing
โ”‚   โ”œโ”€โ”€ features/          # Feature engineering (BoW/TF-IDF)
โ”‚   โ”œโ”€โ”€ modeling/          # Training, evaluation, registry
โ”‚   โ””โ”€โ”€ connections/       # AWS S3 integration
โ”œโ”€โ”€ fastapi_app/
โ”‚   โ”œโ”€โ”€ app.py            # FastAPI application
โ”‚   โ””โ”€โ”€ templates/        # Web interface
โ”œโ”€โ”€ notebooks/            # Experimentation notebooks
โ”œโ”€โ”€ scripts/
โ”‚   โ””โ”€โ”€ promote_model.py  # Smart model promotion
โ”œโ”€โ”€ tests/                # Unit tests
โ”œโ”€โ”€ data/                 # Dataset (tracked by DVC)
โ”œโ”€โ”€ models/               # Saved models
โ”œโ”€โ”€ .github/workflows/    # CI/CD pipeline
โ”œโ”€โ”€ dvc.yaml              # DVC pipeline definition
โ””โ”€โ”€ Dockerfile            # Container configuration

๐Ÿš€ Setup & Deployment

Want to run this project?

๐Ÿ‘‰ Complete Setup Instructions

Includes local setup, DVC pipeline execution, MLflow tracking, Docker deployment, and AWS deployment guide.


๐ŸŽ“ What I Learned

  • Building reproducible ML pipelines with DVC
  • Experiment tracking and model versioning with MLflow
  • Conditional deployment strategies
  • CI/CD for ML systems
  • Docker containerization best practices
  • AWS cloud deployment (ECR + EC2)
  • Writing production-ready ML code
  • Comprehensive testing for ML systems

๐Ÿ”ฎ Future Enhancements

  • Kubernetes: Migrate to K8s for auto-scaling
  • Redis Caching: Cache predictions for faster responses
  • Authentication: Add user management with OAuth2/JWT
  • Monitoring: Implement Prometheus + Grafana dashboards
  • A/B Testing: Compare model versions in production
  • Explainability: Add SHAP/LIME for prediction explanations

๐Ÿ‘ค Author

Harsh Patel
๐Ÿ“ง code.by.hp@gmail.com
๐Ÿ”— GitHub โ€ข LinkedIn


โญ Star this repo if you find it useful

About

ML system that Experiments, Tests, and Deploys itself From raw data to production predictions - completely automated.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors