A complete Machine Learning project that predicts student performance based on various parameters. This repository demonstrates the full lifecycle of an ML application, from data analysis to cloud deployment using Docker and CI/CD pipelines.
- Language: Python (3.8+)
- Framework: FastApi (Backend) / Scikit-Learn (ML)
- Containerization: Docker
- Cloud Provider: AWS (EC2, ECR)
- CI/CD: GitHub Actions (Self-Hosted Runner)
├── artifacts/ # Generated models (model.pkl) & datasets (train/test.csv)
├── logs/ # Application execution logs
├── notebook/ # Jupyter notebooks for EDA & model training
├── src/ # Core application source code
│ ├── components/ # Data ingestion, transformation, & training modules
│ ├── pipeline/ # Training & Prediction pipelines
│ ├── logger.py # Custom logging setup
│ └── exception.py # Custom exception handling
├── static/ # CSS and styling files
├── templates/ # HTML templates for the UI
├── app.py # Application entry point (FastAPI)
├── Dockerfile # Docker configuration
├── requirements.txt # Python dependencies
└── setup.py # Project packaging setup
- Data Ingestion & Transformation: Automated pipelines to handle data processing.
- Model Training & Prediction pipeline: Regression models trained to predict student scores.
- Web Interface: Web UI for user inputs (built with FastAPI/Jinja2).
- Automated Deployment: Fully automated CI/CD pipeline triggering on every push.
git clone [https://github.com/Arpit2744/ML-Project.git](https://github.com/Arpit2744/ML-Project.git)
cd ML-Project
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
pip install -r requirements.txt
python app.py
Open http://127.0.0.1:8000 in your browser.
Build and run the container locally to ensure consistency.
docker build -t student-performance .
docker run -p 8000:8000 student-performance
This project uses GitHub Actions to automate deployment to AWS EC2.
- Integration: Code is linted and tested.
- Delivery: Docker image is built and pushed to AWS ECR (Elastic Container Registry).
- Deployment: A Self-Hosted Runner on an AWS EC2 instance pulls the latest image and updates the running container.
Building this wasn't just about coding; it was about engineering. Here are the real-world issues I solved:
- EC2 Disk Space: The 1.6GB Docker image crashed the
t2.microinstance. I learned to resize AWS EBS volumes and expand Linux partitions on the fly. - Git Divergence: Solved
non-fast-forwardmerge conflicts when syncing local code with remote repo changes. - Docker Zombie Containers: Automated the cleanup of old containers in the CI/CD pipeline to prevent name conflicts during re-deployment.
- Missing Artifacts: Debugged
FileNotFoundErrorcaused by.gitignoreexcluding the trained model file (model.pkl) from the build.
This project is open-source and available under the MIT License.