Digital Engineering & Technology | Elearning Solutions | Digital Content Solutions

Your Go-To Guide on How to Implement Azure MLOps

Several organizations today are using data as a strategic asset to gain a competitive edge. There has been a significant increase in the adoption and implementation of artificial intelligence (AI) & machine learning (ML) strategies globally.

But are all these projects successful?

A recent survey revealed that 36% to 56% of AI and ML projects fail to deliver. Various friction points exist around technology, preventing businesses from gaining the data-driven insights required to achieve the desired results.

Using Azure MLOps, you can streamline the ML lifecycle and bridge the gap between software development and production. Azure Machine Learning allows you to integrate with the Azure DevOps pipeline to automate ML lifecycle processes at the production level.

In this article, you’ll learn how to set up MLOps projects in Azure ML.   

Table of Contents:

What Is Azure MLOps?

Azure Machine Learning Operations (MLOps) allows businesses to adopt and manage MLOps pipelines in the Azure Cloud. With Azure, ML engineers and data scientists can manage MLOps and produce, train, test, and deploy ML models as per their business needs.

Azure ML offers multiple asset management tools to manage the ML lifecycle – from initialization to deployment. What’s more, you can also develop models in the Azure ML workspace.

In short, Azure ML, which contains the MLOps platform, serves the entire ML lifecycle on a single platform.  

Azure MLOps Features

Azure ML allows you to create machine learning pipelines that define repeatable and reusable steps to prepare and train data. You can develop a reusable software environment to package, train, register, and deploy machine-learning models from any location.

Other significant features include:

1. Automation

With Azure MLOps pipeline, you can automate the complete ML lifecycle, test new deep learning models, update existing models, and periodically roll out new ML models with your applications and services.

2. Model Tracking

Azure ML allows you to capture governance information for your ML lifecycle and track metadata. It lets you add various information to the logged lineage data, like the model’s publisher and when the model was deployed and used in production.

3. Auditing

By integrating Azure ML with Git, you can track data on the branches and repositories. You can also track the complete audit trail of all machine learning assets using metadata.

Also Read: 7 Roles of Artificial Intelligence in Learning and Development

Prerequisites to Setup Azure MLOps Pipeline

  • An Azure subscription and Azure ML workspace. You can sign in to the Azure portal (https://portal.azure.com) and create an Azure subscription if you don’t have one.
  • Git operating on your local system.
  • Access to DevOps services.
  • An Azure DevOps project to host the pipelines and source repositories.
  • If you’re using Terraform + Azure DevOps to spin up infrastructure, you will require the Terraform extension for Azure DevOps.

Azure DevOps Setup

Below is a step-by-step guide to setting up Azure DevOps:

  1. Sign in to your Azure DevOps account.
  2. Create a new project by entering the project name and description. Select the “Private” option under the visibility settings.
  3. Go to the bottom left of the project page to access Project Settings and select Service Connections.
  4. Click on “Create service connection”.
  5. Go to Azure Resource Manager, click on “Next,” and choose Service Principal (manual). Click on “Next” and choose the Scope Level Subscription.
  6. Fill in all the required details: Subscription ID, Subscription Name, Service Principal Key, Service Principal ID, and Tenant ID.
  7. Now, name the service connection. For example, you can name the connection – Azure-ARM-Prod.
  8. Choose “Grant access permission to all pipelines” and then click on “Verify and Save.”

With this, you’re Azure DevOps setup is completed.

Source Repository Setup with Azure DevOps

After finishing the Azure DevOps setup, follow these steps to set up the source repository with Azure DevOps:

  1. Sign in to your Azure DevOps account and open the project you created.
  2. Go to the Repos section and choose Import Repository.
  3. Select “Git” under the Repository type and enter the clone URL. Now, click on “Import”.
  4. Go to the bottom of the left-hand navigation pane and open the Project Settings.
  5. Choose Repositories under the Repos section and select the repository that you imported in step 3. Now, click on the Security tab.
  6. Choose the “ProjectName Build Service User” option under the User Permission section. Change the Create Branch permission to Allow and the Contribute permission to Allow.
  7. Go to the Pipelines section in the left-hand navigation pane and click on the three vertical dots next to the “Create Pipeline” option. Choose Manage Security from the dropdown menu.
  8. Under the Users section, choose the “ProjectName Build Service” account. Change the permission status for Edit Build Pipeline from “Not Set” to “Allow.”

With this, you’ve completed the prerequisite section.

Also Read: How do We Technically Approach AI/ML Solutions?

Deploying Azure Infrastructure Pipeline via Azure DevOps

In this step, you’ll deploy the training pipeline to the Azure ML workspace that you created in earlier steps.

  1. Open your repository and select the main branch of the repo. Choose the “config-infra-prod.yml” file under the contents section. Fill in the namespace, postfix, and location section in the config file to your liking.
  2. Choose commit and then click on push code to include these values into the pipeline.
  3. Open the Pipelines section and choose Create Pipeline.
  4. Choose Azure Repos Git.
  5. Choose the repository that you imported in the preceding section.
  6. Click on the Existing Azure Pipelines YAML file.
  7. Choose the main branch and select your pipeline, then click on Continue.
  8. You can now run the pipeline. This will take a few minutes to complete. The pipeline will generate the following:
  • The Azure Machine Learning Workspace along with the Resource Group, Container Registry, Storage Account, Keyvault, and Application Insights.
  • A computer cluster is also created in the Workspace.

With this, your Azure MLOps project infrastructure is deployed.

Wrapping Up!

We hope you now have an idea of how to automate your machine learning pipeline in Azure ML using Azure DevOps. By following the steps mentioned above and utilizing Azure’s services and tools, you can improve collaboration and ensure the scalability and reliability of your deep learning models.  

As AI learning and MLOps continue to evolve, you must stay up-to-date with the latest industry trends and Azure offerings to further optimize your machine learning operations.

If you want to conquer the cloud and scale your applications, Hurix Digital can help! Our team of seasoned professionals can help you develop cloud-native, scalable solutions that grow with your needs. We also offer end-to-end cloud platform managed services, including architecting the solution, regular optimization, and active management.

Schedule a demo with us today and watch your digital infrastructure soar!