Excited to share my latest project - an End-to-end Machine Learning MLOPS Project focused on predictive maintenance to predict machine failure! 🛠️ Leveraging CI/CD pipelines, I streamlined the development process. Utilizing modernized code with OOP concepts, I ensured efficiency and scalability. In data validation, I employed MLflow to fine-tune model hyperparameters, achieving impressive results:
- l1_ratio: 0.0
- max_iter: 135
- penalty: l2
- solver: lbfgs
- R2: 0.9869
- RMSE: 0.02
- MAE: 0.0004
By integrating Data Version Control (DVC.ai) for data management and GitHub Actions for CI/CD workflows, the process was automated seamlessly. With each new commit, the workflow automatically detects changes, creates a new Docker image, and pushes it to Amazon Web Services (AWS) Elastic Container Registry (ECR). Subsequently, the Docker image is pulled by the EC2 instance to run the UI developed with Streamlit. This automated process ensures that the latest changes are reflected in the deployed application, maintaining efficiency and consistency throughout the development cycle.
Check out the deployed UI here: http://3.110.195.10:8501/ 🌐
- Update config.yaml
- Update schema.yaml
- Update params.yaml
- Update the entity
- Update the configuration manager in src config
- Update the components
- Update the pipeline
- Update the main.py
- Update the app.py
- Clone the repository
https://github.com/Smith-S-S/End-to-End-Data-Science-Project-Using-MLOPS.git
- Create a conda environment after opening the repository
conda create -n mlproj python=3.8 -y
conda activate mlproj
- Install the requirements
pip install -r requirements.txt
- Run the following command
python app.py
- Open your local host and port
Run this to export as env variables:
- Login to AWS console.
- Create IAM user for deployment with specific access:
- EC2 access: Virtual machine
- ECR: Elastic Container Registry to save your Docker image in AWS
- Create ECR repo to store/save Docker image
- Create EC2 machine (Ubuntu)
- Open EC2 and Install Docker in EC2 Machine
- Configure EC2 as self-hosted runner
- Setup GitHub secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- AWS_ECR_LOGIN_URI
- ECR_REPOSITORY_NAME
#optinal
sudo apt-get update -y
sudo apt-get upgrade
#required
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu