Giter Club home page Giter Club logo

azure-mlops's Introduction

Getting started

  • 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

Understand the code base

MLOps workflow

  1. Notebook with promising model
  2. Clean the code, add linting and testing and create a code base (package)
  3. Prep the data for model training
  4. Train the model with MLflow
  5. Score the model
  6. Register the model with MLflow
  7. Create an endpoint and deploy the model
  8. Validate the model using the endpoint
  9. Integrate the endpoint with a web app
  10. Monitor
  11. Retrain

How to create a MLOps workflow

The training pipeline

Clean the code base

  • 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

Evaluate the model

  • In ./src update the file evaluate.py
  • In pipelines/model-training.yml update the parameters for evaluate.py

Register the model

  • In ./src update the file register.py
  • In pipelines/model-training.yml update the parameters for register.py

The deployment pipeline

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

Deploy to production

  • After all the above steps have passed the endpoint in production can be updated

Monitor a model

azure-mlops's People

Contributors

datafairy-azure avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.