- Project Dynamic Risk Assessment System in ML DevOps Engineer Nanodegree program by Udacity.
Project to create, deploy, and monitor a risk assessment ML model that will estimate the attrition risk of each of the company's 10,000 clients. Project covers 4 aspects of MLOps:
- New data detection and ingestion
- Training, scoring, and deploying ML model
- Model diagnostics
- Model reporting
The directory structure:
.
├── ingesteddata
│ └── finadata.csv
├── models
│ ├── apireturns.txt
│ ├── confusionmatrix.png
│ ├── latestscore.txt
│ └── trainedmodel.pkl
├── screenshots
│ └── app.png
├── production_deployment
│ ├── ingestedfiles.txt
│ ├── latestscore.txt
│ └── trainedmodel.pkl
├── sourcedata
│ ├── dataset3.csv
│ └── dataset4.csv
├── templates
│ └── index.html
├── testdata
│ └── testdata.csv
├── apicalls.py
├── app.py
├── config.json
├── cronjob.txt
├── deployment.py
├── diagnostics.py
├── LICENSE
├── README.md
├── reporting.py
├── requirements.txt
├── scoring.py
├── test.py
├── training.py
└── wsgi.py
training.py
: Python script meant to train an ML modelscoring.py
: Python script meant to score an ML modeldeployment.py
: Python script meant to deploy a trained ML modelingestion.py
: Python script meant to ingest new datadiagnostics.py
: Python script meant to measure model and data diagnosticsreporting.py
: Python script meant to generate reports about model metricsapp.py
: Python script meant to contain API endpointswsgi.py
: Python script to help with API deploymentapicalls.py
: Python script meant to call your API endpointsfullprocess.py
: script meant to determine whether a model needs to be re-deployed, and to call all other Python scripts when neededcronjob.txt
: crontab text runs the fullprocess.py script every 10 min
Make sure to have conda installed and ready.
> conda create -n [envname] python=3.8
> pip install -r requirements.txt
> python app.py
> service cron start
> crontab -e
Press the "i" key
Insert a cron job from cronjob.txt
Press the escape key
Type ":wq"
> python fullprocess.py