The Kidney Disease Classification project is a machine learning-based solution designed to classify kidney disease using medical data. The project leverages MLflow and DVC for experiment tracking and version control and supports deployment using AWS CICD with GitHub Actions.
To ensure smooth development and deployment, follow the steps below:
config.yaml
for model training configurations.secrets.yaml
for credentials and sensitive information.params.yaml
to tune hyperparameters.config_entity.py
inside the entity
folder.src/cnnClassifier/config
.src/cnnClassifier/components
.src/cnnClassifier/pipeline
.main.py
to execute the end-to-end pipeline.dvc.yaml
to manage dependencies and pipeline stages.app.py
is updated for serving the model via Flask API.git clone https://github.com/venkateshpabbati/Kidney-Disease-Classification.git
cd Kidney-Disease-Classification
python -m venv .venv
.venv\Scripts\Activate.ps1
source .venv/bin/activate
pip install -r requirements.txt
python app.py
Open your browser and go to http://localhost:<PORT>
(replace <PORT>
with the actual port number).
mlflow ui
export MLFLOW_TRACKING_URI=https://dagshub.com/venkateshpabbati/Kidney-Disease-Classification.mlflow
export MLFLOW_TRACKING_USERNAME=username
export MLFLOW_TRACKING_PASSWORD=password
import dagshub
dagshub.init(repo_owner='venkateshpabbati', repo_name='Kidney-Disease-Classification', mlflow=True)
import mlflow
with mlflow.start_run():
mlflow.log_param('parameter name', 'value')
mlflow.log_metric('metric name', 1)
dvc init
dvc repro
dvc dag
566373416292.dkr.ecr.us-east-1.amazonaws.com/kidney-disease-classifier
).sudo apt-get update -y
sudo apt-get upgrade -y
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu
newgrp docker
Go to GitHub repository:
Configure GitHub Secrets under Settings > Secrets and Variables > Actions
:
AWS_ACCESS_KEY_ID=<YOUR_AWS_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET_ACCESS_KEY>
AWS_REGION=us-east-1
AWS_ECR_LOGIN_URI=566373416292.dkr.ecr.us-east-1.amazonaws.com
ECR_REPOSITORY_NAME=kidney-disease-classifier
docker build -t kidney-disease-classifier .
eval $(aws ecr get-login --no-include-email --region us-east-1)
docker tag kidney-disease-classifier:latest 566373416292.dkr.ecr.us-east-1.amazonaws.com/kidney-disease-classifier:latest
docker push 566373416292.dkr.ecr.us-east-1.amazonaws.com/kidney-disease-classifier:latest
docker run -d -p 5000:5000 566373416292.dkr.ecr.us-east-1.amazonaws.com/kidney-disease-classifier:latest
Navigate to http://<EC2_PUBLIC_IP>:5000
This project provides a robust and scalable workflow for kidney disease classification, leveraging MLflow for experiment tracking, DVC for version control, and AWS CI/CD for automated deployment. By following this guide, you can effectively train, track, and deploy your models in a production-ready environment.