Skip to content

Training and deploying CatBoost Model with MLFlow, Flask, AWS ECS and github actions

Notifications You must be signed in to change notification settings

amine-akrout/bank_deposit_prediction

Repository files navigation

Deploying CatBoost Machine Learning Model as Web App on AWS

GitHub Workflow Status

Data Information

Attribute Information:

  • age: (numeric)
  • job: type of job (categorical)
  • marital: marital status (categorical: 'divorced','married','single','unknown'; note: 'divorced' means divorced or widowed)
  • education: (categorical) default: has credit in default? (categorical: 'no','yes','unknown')
  • housing: has housing loan? (categorical: 'no','yes','unknown')
  • loan: has personal loan? (categorical: 'no','yes','unknown')
  • balance: deposit amount (numeric)

Workflow Architecture

workflow_architecture

Requirements

  • Python 3.8
  • Docker
  • Amazon Web Services account

Quick Start

  • Clone the repository
git clone https://github.com/amine-akrout/bank_deposit_prediction
  • Create a virtual and install requirements
python -m venv
pip install -r requirements.txt
  • Train Catboost using Pycaret and log metrics and artifacts with MLflow
python ./model.py

MLflow experiment demo_webapp

Test locally

To test the web app locally using docker, start by building the image from the Dockerfile

docker build --pull --rm -f "Dockerfile" -t bankdeposit:latest "."
docker run -p 8080:8080 bankdeposit

the Web app should be runnining on http://localhost:8080/

Deploy to AWS ECS


CI/CD workflow

Using Github actions and aws.yml, we could continuously deploy the web app by simply using the term "deploy" in the commit message when pushing to main branch

Demo

demo_webapp

About

Training and deploying CatBoost Model with MLFlow, Flask, AWS ECS and github actions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published