This repository is a comprehensive machine learning project designed to demonstrate a complete ML pipeline, from data processing and model training to deployment via a web application. The project structure and scripts enable modular development and easy extension.
-
End-to-End Machine Learning Pipeline:
Modular code for data ingestion, cleaning, feature engineering, model training, evaluation, and prediction. -
Web Application Deployment:
A Flask-based web app (application.py) allows users to interact with the trained model and make predictions via a browser interface. -
Exception Handling and Logging:
Custom modules for robust error handling (src/exception.py) and detailed logging (src/logger.py) to ensure maintainability and traceability. -
Reusable Utilities:
Utility functions insrc/utils.pyfor common tasks such as data transformation, file I/O, and model persistence. -
Component-based Design:
Thesrc/componentsdirectory is intended for modular pipeline components (e.g., data loader, transformer, trainer). -
Pipeline Management:
Thesrc/pipelinedirectory contains scripts for orchestrating the ML workflow stages. -
Artifacts and Model Outputs:
Trained models, preprocessing objects, and other outputs are stored in theartifactsdirectory for reproducibility and easy deployment. -
Experiment Tracking:
Thecatboost_infodirectory is used to log CatBoost model training details. -
Interactive Notebooks:
Thenotebookdirectory contains Jupyter notebooks for data analysis, prototyping, and exploratory data analysis (EDA). -
Custom Templates:
Thetemplatesdirectory contains HTML files for the web application's frontend.
├── .ebextensions/ # Deployment configuration for AWS Elastic Beanstalk
├── artifacts/ # Model artifacts, checkpoints, and outputs
├── catboost_info/ # CatBoost training logs and info
├── notebook/ # Jupyter notebooks for EDA and prototyping
├── src/
│ ├── __init__.py
│ ├── components/ # Modular pipeline components
│ ├── exception.py # Custom exception handling
│ ├── logger.py # Logging setup and utilities
│ ├── pipeline/ # Pipeline orchestration scripts
│ └── utils.py # Utility functions
├── templates/ # HTML templates for the web interface
├── application.py # Flask app entry point
├── requirements.txt # Python dependencies
├── setup.py # Package installation script
├── .gitignore # Git ignore rules
└── README.md # Project documentation
-
Clone the repository
git clone https://github.com/imswatisinha/ML_Project.git cd ML_Project -
Install dependencies
pip install -r requirements.txt
-
Run the web application
python application.py
Then, open your browser and go to
http://localhost:5000. -
Explore Notebooks
- Navigate to the
notebookdirectory and open.ipynbfiles using Jupyter Notebook or JupyterLab.
- Navigate to the
- To extend or modify pipeline components, add or edit scripts under
src/componentsorsrc/pipeline. - Update HTML templates in the
templatesdirectory to customize the web UI. - Enhance utilities and logging as needed for your workflow.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License.
For any questions, open an issue in the repository or contact the maintainer.