Skip to content

saitejamalyala/End2End_ML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

End to End machine learning workflow Python application

Used Car Prediction

Instructions

This repo contains sample code for the End to End machine learning for used car price prediction. Data set used for the project is Vehicle dataset from kaggle

  • Suggested to try the project by creating a virtual environment
    python -m venv env_end2endML
    
  • Activate the virutal environment
  • Install the dependencies using the command
    pip install -r requirements.txt 
    

To train the model :

  1. Download the data
  2. Modify the configuration according to needs in config.yaml
  3. Train the model by running python src/train.py

Experiments and artifacts(Code, data, model) tracking using weights and biases

  1. After step 3, you will be prompted to enter wandb login details to track the experiments, metrics and artifcats
  2. For hyper parameter sweep run wandb agent username/project-name/sweepcode
  3. Check previous experiments and sweeps here
  4. Check model artifacts with versioning here

CI/CD using github actions, unit testing with pytest

This repo contains two workflows

  1. Python applicaton work flow to check if training pipeline is not broken after every push/pull.
  2. Extend test cases if needed here or here
  3. Docker build workflow to check if docker image building is successful after every push/pull.

Deploying the model using an webapp

  1. Make predictions on the validation set by running python src/predict.py
  2. To run the streamlit app streamlit run src/app.py
  3. After step 12 open the browser if you are running in your local machine or check step 14
  4. Check the public app

Serving model using FAST API

  1. To serve using fast API using following commands
cd fastapi 
uvicorn main:app -reload
  1. check on local host

Building Docker Image

  1. Configure the Docker image by editing the Dockerfile
  2. Build the docker image using sudo docker run -p 8051:8051 appname:tag

Followed by container orchestration and model monitoring

This benchmark took approximately 0.5 hours to execute on a Windows 10 laptop with 12GB of RAM and 8 cores at 2GHz.

About

End to End machine learning workflow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published