You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-setup-mlops-github-azureml.md
+20-23Lines changed: 20 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Set up MLOps with Github
3
3
titleSuffix: Azure Machine Learning
4
-
description: Learn how to set up a sample MLOps environment in AzureML
4
+
description: Learn how to set up a sample MLOps environment in AzureML with GitHub Actions
5
5
services: machine-learning
6
6
author: abeomor
7
7
ms.author: osomorog
@@ -36,9 +36,6 @@ In this article, you learn about using Azure Machine Learning to set up an end-t
36
36
- An Azure Machine Learning workspace.
37
37
- Git running on your local machine.
38
38
- Github as the source control repository
39
-
- Install the [GitHub CLI](https://cli.github.com/)
40
-
- Install the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
41
-
- The [Terraform extension for Azure DevOps](https://marketplace.visualstudio.com/items?itemName=ms-devlabs.custom-terraform-tasks) if you're using Azure DevOps + Terraform to spin up infrastructure
42
39
43
40
> [!NOTE]
44
41
>
@@ -52,7 +49,7 @@ In this article, you learn about using Azure Machine Learning to set up an end-t
52
49
Before you can set up an MLOps project with AzureML, you need to set up authentication for Azure DevOps.
53
50
54
51
### Create service principal
55
-
For the use of the demo, the creation of one or two service principles is required, depending on how many environments, you want to work on (Dev or Prod or Both). These principles can be created using one of the following methods:
52
+
For the use of the demo, the creation of one is required, you can add more depending on how many environments, you want to work on (Dev or Prod or Both). These principles can be created using one of the following methods:
56
53
57
54
# [Create from Azure Cloud Shell](#tab/azure-shell)
58
55
@@ -65,7 +62,7 @@ Before you can set up an MLOps project with AzureML, you need to set up authenti
65
62
66
63

67
64
68
-
1. Copy the following bash commands to your computer and update the **projectName**, **subscriptionId**, and **environment** variables with the values for your project. If you're creating both a Dev and Prod environment, you'll need to run this script once for each environment, creating a service principal for each. This command will also grant the **Contributor** role to the service principal in the subscription provided. This is required for Azure DevOps to properly use resources in that subscription.
65
+
1. Copy the following bash commands to your computer and update the **projectName**, **subscriptionId**, and **environment** variables with the values for your project. This command will also grant the **Contributor** role to the service principal in the subscription provided. This is required for Azure DevOps to properly use resources in that subscription.
69
66
70
67
```bash
71
68
projectName="<your project name>"
@@ -100,7 +97,7 @@ Before you can set up an MLOps project with AzureML, you need to set up authenti
100
97
}
101
98
```
102
99
103
-
1. Copy all of this output, braces included.
100
+
1. Copy all of this output, braces included. Save this information to a safe location, it will be use later in the demo to configure GitHub Repo.
104
101
105
102
1. Close the Cloud Shell once the service principals are created.
106
103
@@ -127,10 +124,11 @@ Before you can set up an MLOps project with AzureML, you need to set up authenti
127
124
128
125
---
129
126
130
-
### Set up GitHub Repo
127
+
## Set up GitHub Repo
131
128
132
-
1. **Fork the MLOps v2 Demo Template Repositories in your GitHub organization**
133
-
Go to https://github.com/Azure/mlops-v2-gha-demo/fork to fork the mlops v2 demo repo into your Github org. This repo has reusable mlops code that can be used across multiple projects.
129
+
1. Fork the [[MLOps v2 Demo Template Repo](https://github.com/Azure/mlops-v2-gha-demo) in your GitHub organization
130
+
131
+
1. Go to https://github.com/Azure/mlops-v2-gha-demo/fork to fork the mlops v2 demo repo into your Github org. This repo has reusable mlops code that can be used across multiple projects.
This will display the pre-defined GitHub workflows associated with your project. For a classical machine learning project, the available workflows will look similar to this:
1. On the right side of the page, select**Run workflow** and selectthe branch to run the workflow on. This may deploy Dev Infrastructure if you've created a dev branch or Prod infrastructure if deploying from main. Monitor the pipline for successful completion.
1. When the pipeline has complete successfully, you can find your Azure ML Workspace and associated resources by logging in to the Azure Portal. Next, a model training and scoring pipelines will be deployed into the new Azure Machine Learning environment.
205
203
@@ -237,7 +235,7 @@ Next, you will deploy the model training pipeline to your new Azure Machine Lear
237
235
238
236
1. In your GitHub project repository (ex: taxi-fare-regression), select **Actions**
1. Select the **deploy-model-training-pipeline** from the workflows listed on the left and the click **Run Workflow** to execute the model training workflow. This will take several minutes to run, depending on the compute size.
243
241
@@ -258,29 +256,28 @@ This scenario includes prebuilt workflows for two approaches to deploying a trai
258
256
259
257
1. In your GitHub project repository (ex: taxi-fare-regression), select **Actions**
1. Select the **deploy-online-endpoint-pipeline** from the workflows listed on the left and click **Run workflow** to execute the online endpoint deployment pipeline workflow. The steps in this pipeline will create an online endpoint in your Azure Machine Learning workspace, create a deployment of your model to this endpoint, then allocate traffic to the endpoint.
1. Select the **deploy-batch-endpoint-pipeline** from the workflows and click **Run workflow** to execute the batch endpoint deployment pipeline workflow. The steps in this pipeline will create a new AmlCompute cluster on which to execute batch scoring, create the batch endpoint in your Azure Machine Learning workspace, then create a deployment of your model to this endpoint.
Example scenarios can be trained and deployed both for Dev and Prod branches and environments. When you are satisfied with the performance of the model training pipeline, model, and deployment in Testing, Dev pipelines and models can be replicated and deployed in the Production environment.
0 commit comments