View Code? Open in Web Editor
NEW
This project forked from datafairy-azure/azure-mlops
MLOPS pipeline code for AzureML
Python 45.58%
Jupyter Notebook 54.42%
azure-mlops's Introduction
- Create a virtual environment: python -m venv .venv
- Activate the venv: source .venv/bin/activate
- pip install --upgrade setuptools
- pip install --upgrade pip
- pip install -r requirements.txt
- pip install . to install the mlops package
- fill out config.yml and move it to ./config
- setup pre-comit hooks: pre-commit install
- Notebook with promising model
- Clean the code, add linting and testing and create a code base (package)
- Prep the data for model training
- Train the model with MLflow
- Score the model
- Register the model with MLflow
- Create an endpoint and deploy the model
- Validate the model using the endpoint
- Integrate the endpoint with a web app
- Monitor
- Retrain
How to create a MLOps workflow
- add the experimental notebook to ./notebooks
- move the code from the notebook to ./src directory and create a main.py file
- create functions, clean up the code, write unit tests and add liniting
- pytest and flake8 should pass when running in the ./src directory
Create a script to prep the data
- The data needs to be splint into train/validate/test data sets
- The data needs to be uploaded to the blob
Create a script to train the model
- In ./src update the file train.py
- In pipelines/model-training.yml update the parameters for train.py
- In ./src update the file evaluate.py
- In pipelines/model-training.yml update the parameters for evaluate.py
- In ./src update the file register.py
- In pipelines/model-training.yml update the parameters for register.py
Create or update the endpoint
- Once the predictions for the test-set are accepted update the endpoint with the newly trained model
- In ./jobs/yaml run create_or_update_endpoint.yml
- In ./jobs/yaml run deploy_model_to_endpoint.yml
- In ./jobs/yaml run score_endpoint.yml
- After all the above steps have passed the endpoint in production can be updated
azure-mlops's People
Contributors