Code Monkey home page Code Monkey logo

techbash_mlops's Introduction

Techbash MLOps Workshop

This repository contains the code and instructions for the Techbash MLOps workshop.

Setup

Prerequisites

  1. Azure CLI
  2. Azure Subscription with Owner permissions
  3. Git
  4. GitHub Account
  5. Administrator rights to your computer (the ability to install software)
  6. Python 3.11.6
  7. Visual Studio Code:
    1. Jupyter extension
    2. Python extension

Preparing for the challenge

Prepare your environment for the challenge by following the instructions in the Create challenge repository document.

Helpful learning resources

This learning path goes hand-in-hand with the challenges and provides additional context. A lot of the content mimics what is requested in the challenges. If you are entirely new to Azure Machine Learning, I highly recommend going through this learning path. I will be here to answer any questions along the way if you choose this path.

End-to-end machine learning operations (MLOps) with Azure Machine Learning

Bring on the challenges!

Challenge 0: Convert a notebook to production code

Scenario Details: Understand the business problem

Challenge Details: Convert a notebook to production code

Solution walkthrough: SPOILERS

Challenge 1: Create an Azure Machine Learning job

Now we get to delve into the architecture and resources needed to support MLOps.

Note: As part of this challenge,you'll need to setup the infrastructure in Azure. Do this in any way that you are comfortable, using the portal, Azure CLI, PowerShell, Terraform, etc.

Review the solution architecture: Explore the solution architecture

Challenge Details: Create an Azure Machine Learning job.

Solution walkthrough: SPOILERS

Challenge 2: Trigger the Azure Machine Learning job with GitHub Actions

Now let's get into the automation. We'll use GitHub actions to setup a workflow that provisions a server and submits a a job using Service Principal credentials.

Scenario Details: Understand the business problem

Review the solution architecture: Explore the solution architecture

Challenge Details: Trigger the Azure Machine Learning job with GitHub Actions

Solution walkthrough: SPOILERS

Challenge 3: Trigger GitHub Actions with feature-based development

We want some control over when we trigger the training of our models. To do this, we'll protect our main branch in the repository, so that all work needs to be reviewed and approved before being merged in.

Scenario details: Understand the business problem

Review the solution architecture: Explore the solution architecture

Challenge details: Trigger GitHub Actions with feature-based development

Solution walkthrough: SPOILERS

Challenge 4: Work with linting and unit testing

We want to ensure that our code is of high quality. To do this, we'll add linting and unit testing to our workflow and ensure these checks are done prior to merging our code.

Scenario details: Understand the business problem

Review the solution architecture: Explore the solution architecture

Challenge details: Work with linting and unit testing

Solution walkthrough: SPOILERS

Challenge 5: Work with environments

In the "real world", we typically have multiple environments, such as dev, test, qa and production. It would be ideal to be able to automate the deployment of our models to the various environments using environment variables that differ for each one.

Gate-checks are also a common practice. We want to ensure that our code is reviewed and approved before it is deployed to various environments. It is highly recommended that any push to a production environment is done with specific approval (rather than automated on push).

Scenario details: Understand the business problem

Review the solution architecture: Explore the solution architecture

Challenge details: Work with environments

Solution walkthrough: SPOILERS

Challenge 6: Deploy and test the model

What good is a model if we can't use it? In this challenge, we'll deploy our model to an Azure Managed Endpoint and test it using a REST API.

Scenario details: Understand the business problem

Review the solution architecture: Explore the solution architecture

Challenge details: Deploy and test the model

Solution walkthrough: SPOILERS

Clean up

Delete the resource group that you created in Challenge 1 - this resource group contains all services deployed throughout this workshop.

In the Azure Portal, locate the Microsoft Entra ID service. From the left menu, select App registrations, select to view all applications. Locate the diabetes-dev-svcid and delete it.

In GitHub, locate your repository, select Settings, scroll to the bottom and select Delete this repository.

Conclusion

Congratulations on completing all of the challenges in this MLOps workshop. You now know how to automate a machine learning workflow using GitHub Actions and Azure Machine Learning end-to-end. You can now take this knowledge and apply it to your own projects.

techbash_mlops's People

Contributors

codingbandit avatar

Watchers

 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.