This repository contains the code and instructions for the Techbash MLOps workshop.
- Azure CLI
- Azure Subscription with Owner permissions
- Git
- GitHub Account
- Administrator rights to your computer (the ability to install software)
- Python 3.11.6
- Visual Studio Code:
Prepare your environment for the challenge by following the instructions in the Create challenge repository document.
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
Scenario Details: Understand the business problem
Challenge Details: Convert a notebook to production code
Solution walkthrough: SPOILERS
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
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
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
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
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
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
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.
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.