Solution Template for Deploying Azure ML Models to AKS Clusters via Azure DevOps

Published May 03 2021 01:45 PM 3,428 Views
Microsoft

Background and Overview

 

Azure Machine Learning (AML) natively supports deploying a model as a web service on Azure Kubernetes Service (AKS). Based on the official AML documentation, deploying models to AKS offers the following benefits: Fast response time, Auto-scaling of the deployed service, Logging, Model data collection, Authentication, TLS termination, Hardware acceleration options such as GPU and field-programmable gate arrays (FPGA). Please refer to the official documentation for directions on using AML Python SDK, Azure CLI, or even Visual Studio Code to deploy models to AKS. 

 

This blog article, as well as the accompanying GitHub repo, demonstrates an alternative option, which offers significant flexibility in model deployment. In particular, this solution template helps enable the following use cases:

 

  1. Enable multi-region deployment
  2. More flexibility in endpoint configuration and management
  3. Model agnostic--one endpoint can invoke several models, providing the required environment is built beforehand. One environment can be reused across several models
  4. Controlled rollout of model inference deployment
  5. Enable higher automation across various AML workspaces for CI/CD purposes
  6. The solution can be customized to retrieve models directly from Azure storage, without invoking AML workspace at all, providing further flexibility
  7. The solution can be modified to include use cases beyond model inferencing. Data engineering via AKS endpoint without any specified model is also possible.

 

Contributor:

Han Zhang (Microsoft Data & AI Cloud Solution Architect)

Ganesh Radhakrishnan (Microsoft Senior App & Infra Cloud Solution Architect)

 

Prerequisites

 

Before you proceed, please complete the following prerequisites:

 

  1. Review and complete all modules in Azure Fundamentals course.
  2. An Azure Resource Group with Owner Role permission. All Azure resources will be deployed into this resource group.
  3. A GitHub Account to fork and clone this GitHub repository.
  4. An Azure DevOps Services (formerly Visual Studio Team Services) Account. You can get a free Azure DevOps account by accessing the Azure DevOps Services web page.
  5. An Azure Machine Learning workspace. AML is an enterprise-grade machine learning service to build and deploy models faster. In this project, you will use AML to register and retrieve models.
  6. This project assumes readers/attendees are familiar with Azure Machine Learning, Git SCM, Linux Containers (docker engine), Kubernetes, DevOps (Continuous Integration/Continuous Deployment) concepts and developing Microservices in one or more programming languages. If you are new to any of these technologies, go thru the resources below.
  7. (Optional) Download and install Postman App, a REST API Client used for testing the Web API's.

 

Architecture Diagram

 

Here is the architecture diagram for this solution template: 

architecture.png

 

For easy and quick reference, readers can refer to the following online resources as needed.

 

Step by Step Instructions

 

Set up Azure DevOps Project

 

  1. Go to Azure Devops website, and set up a project named AML_AKS_custom_deployment (Substitute any name as you see fit.)

 

Set up Project

 

  1. Go to Repos on the left side, and find Import under Import a repository
  2. 1.png

     Use https://github.com/HZ-MS-CSA/aml_aks_generic_model_deployment as clone URL

 

Upload AML Model

 

As a demonstration, we will be using an onnx model from a Microsoft Cloud Workshop activity.

  1. "This is a classification model for claim text that will predict 1 if the claim is an auto insurance claim or 0 if it is a home insurance claim. The model will be built using a type of Deep Neural Network (DNN) called the Long Short-Term Memory (LSTM) recurrent neural network using TensorFlow via the Keras library." Source here.
  2. For step by step guidance on how to create and train this model, please see the MCW workshop here.
  3. For your convenience, you can find the onnx model under sample_model/claim_classifer.zip
  4. Download and unzip the file, and upload the onnx model to Azure ML workspace2.png

 

Modify Azure DevOps Repo Content

 

There are two files that need to be modified to accommodate the onnx model

  1. ./main-generic.py: This is essentially a scoring entry script that calls AML SDK, retrieve the model from the registry, and wrap it in a flask API. The original main-generic.py is a template, and you can add any relevant codes to execute the model in this file. Please replace the content of this file with ./sample_model/main-generic.py (An example of how to customize this python script)
    1. ./sample_model/main-generic.py is an adapted version of the original MCW-Cognitive services and deep learning Claim Classification Jupyter Notebook. Please see source here.
  2. ./project_env.yml: This specifies the dependencies required for the model to execute. Please replace the content of this file with ./sample_model/project_env.yml (An example of how to customize this yml file)

 

Set up Build Pipeline

 

  1. Create a pipeline by using the classical editor. Select your Azure Repos Git as source. Then start with an empty job.
  2. Change the agent specification as ubuntu-18.04 (same for release pipeline as well)
  3. Copy Files Activity: Configure the activity based on the screenshot below
  4. 3.png

     Docker-Build an Image: Configure the activity based on the notes and screenshot below

    1. Change task version to be 0.*
    2. Select an Azure container registry, and authorize Azure Devops's Azure connection
    3. In the "Docker File" section, select the Dockerfile in Azure Devops repo
    4. Leave everything else as default4.png

      5.png

  5. Docker-Push an Image: Configure the activity based on the notes and screenshot below
    1. Change task version to be 0.*
    2. Select the same ACR as Build an Image step above
    3. Leave everything else as default6.png7.png 
  6. Publish Build Artifact: Leave everything as default

  7. 8.png

     Save and queue the build pipeline.

 

Set up Release Pipeline

 

  1. Start with an empty job

  2. Change Stage name to be AKS-Cluster-Release

  3. 9.png

    Add build artifact

  4. 10.png

    Set up continuous deployment trigger--the release pipeline will be automatically kicked off every time a build pipeline is modified

  5. 11.png

    helm upgrade: Package and deploy helm charts activity.

    1. Select an appropriate AKS cluster
    2. Enter a custom namespace for this release. For this demo, the namespace is aml-aks-onnx
    3. Command is "upgrade"
    4. Chart type is "File path". Chart path is shown in the screenshot below
    5. Set release name as aml-aks-onnx-1
    6. Make sure to select Install if not present and wait
    7. Go to your Azure Container Registry, and find Login server URL. Your Image repository path is LOGIN_SERVER_URL/REPOSITORY_NAME.
    8. In arguments, enter the following content: 

      --create-namespace --set image.repository=IMAGE_REPOSITORY_PATH --set image.tag=$(Build.BuildId) --set amlargs.azureTenantId=$(TenantId) --set amlargs.azureSubscriptionId=$(SubscriptionId) --set amlargs.azureResourceGroupName=$(ResourceGroup) --set amlargs.azureMlWorkspaceName=$(WorkspaceName) --set amlargs.azureMlServicePrincipalClientId=$(ClientId) --set amlargs.azureMlServicePrincipalPassword=$(ClientSecret)

      12.png

      13.png

      14.png

      15.png

  6. In Variables/Pipeline Variables, create and enter the following required values

    1. ClientId: Follow How to: Use the portal to create an Azure AD application and service principal that can access resou... to create a service principal that can access Azure ML workspace
    2. ClientSecret: See the instruction for ClientId
    3. ResourceGroup: Resource Group for AML workspace
    4. SubscriptionId: Can be found on AML worksapce overview page.
    5. TenantId: Can be found in Azure Activate Directory
    6. WorkspaceName: AML workspace name16.png
  7. Save, create, and deploy release17.png

    18.png

 

Testing

 

  1. Retrieve external IP for deployed service
    1. Open powershell
    2. az account set --subscription SUBSCRIPTION_ID
    3. az aks get-credentials --resource-group RESOURCE_GROUP_NAME --name AKS_CLUSTER_NAME
    4. kubectl get deployments --all-namespaces=true
    5. Find the aml-aks-onnx namespace, make sure it's ready
    6. kubectl get svc --namespace aml-aks-onnx. External IP will be listed there
  2. Use test.ipynb to test it out
    1. endpoint is http://EXTERNAL_IP:80/score. You can optionally set it to be http://EXTERNAL_IP:80/healthcheck and then use the get method to do a quick health check
    2. In the post method section, make sure to enter the model name. In this demo, the model name is claim_classifier_onnx_demo. Enter any potential insurance claim text, and see the model classifies it into auto or home insurance claim in real time.19.png

      20.png

 

License

MIT License

Copyright (c) 2021 HZ-MS-CSA

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1 Comment

Thank you @Han_Zhang_CSA for Sharing this Awesome blog with the Community :stareyes:

%3CLINGO-SUB%20id%3D%22lingo-sub-2318919%22%20slang%3D%22en-US%22%3ESolution%20Template%20for%20Deploying%20Azure%20ML%20Models%20to%20AKS%20Clusters%20via%20Azure%20DevOps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2318919%22%20slang%3D%22en-US%22%3E%3CH2%20id%3D%22toc-hId--470512575%22%20id%3D%22toc-hId--470512569%22%20id%3D%22toc-hId--470512569%22%3EBackground%20and%20Overview%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3EAzure%20Machine%20Learning%20(AML)%20natively%20supports%20deploying%20a%20model%20as%20a%20web%20service%20on%20Azure%20Kubernetes%20Service%20(AKS).%20Based%20on%20the%20official%20AML%20documentation%2C%20deploying%20models%20to%20AKS%20offers%20the%20following%20benefits%3A%20Fast%20response%20time%2C%20Auto-scaling%20of%20the%20deployed%20service%2C%20Logging%2C%20Model%20data%20collection%2C%20Authentication%2C%20TLS%20termination%2C%20Hardware%20acceleration%20options%20such%20as%20GPU%20and%20field-programmable%20gate%20arrays%20(FPGA).%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2Fhow-to-deploy-azure-kubernetes-service%3Ftabs%3Dvisual-studio-code%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EPlease%20refer%20to%20the%20official%20documentation%3C%2FA%3E%20for%20directions%20on%20using%20AML%20Python%20SDK%2C%20Azure%20CLI%2C%20or%20even%20Visual%20Studio%20Code%20to%20deploy%20models%20to%20AKS.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20blog%20article%2C%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FHZ-MS-CSA%2Faml_aks_generic_model_deployment%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eas%20well%20as%20the%20accompanying%20GitHub%20repo%3C%2FA%3E%2C%20demonstrates%20an%20alternative%20option%2C%20which%20offers%20significant%20flexibility%20in%20model%20deployment.%20In%20particular%2C%20this%20solution%20template%20helps%20enable%20the%20following%20use%20cases%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EEnable%20multi-region%20deployment%3C%2FLI%3E%0A%3CLI%3EMore%20flexibility%20in%20endpoint%20configuration%20and%20management%3C%2FLI%3E%0A%3CLI%3EModel%20agnostic--one%20endpoint%20can%20invoke%20several%20models%2C%20providing%20the%20required%20environment%20is%20built%20beforehand.%20One%20environment%20can%20be%20reused%20across%20several%20models%3C%2FLI%3E%0A%3CLI%3EControlled%20rollout%20of%20model%20inference%20deployment%3C%2FLI%3E%0A%3CLI%3EEnable%20higher%20automation%20across%20various%20AML%20workspaces%20for%20CI%2FCD%20purposes%3C%2FLI%3E%0A%3CLI%3EThe%20solution%20can%20be%20customized%20to%20retrieve%20models%20directly%20from%20Azure%20storage%2C%20without%20invoking%20AML%20workspace%20at%20all%2C%20providing%20further%20flexibility%3C%2FLI%3E%0A%3CLI%3EThe%20solution%20can%20be%20modified%20to%20include%20use%20cases%20beyond%20model%20inferencing.%20Data%20engineering%20via%20AKS%20endpoint%20without%20any%20specified%20model%20is%20also%20possible.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EContributor%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.linkedin.com%2Fin%2Fhan-zhang-csa-msft%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHan%20Zhang%20(Microsoft%20Data%20%26amp%3B%20AI%20Cloud%20Solution%20Architect)%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.linkedin.com%2Fin%2Fganesh-radhakrishnan-11217329%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGanesh%20Radhakrishnan%20(Microsoft%20Senior%20App%20%26amp%3B%20Infra%20Cloud%20Solution%20Architect)%3C%2FA%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-2017000258%22%20id%3D%22toc-hId-2017000264%22%20id%3D%22toc-hId-2017000264%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-209545795%22%20id%3D%22toc-hId-209545801%22%20id%3D%22toc-hId-209545801%22%3EPrerequisites%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBefore%20you%20proceed%2C%20please%20complete%20the%20following%20prerequisites%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EReview%20and%20complete%20all%20modules%20in%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fpaths%2Fazure-fundamentals%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Fundamentals%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ecourse.%3C%2FLI%3E%0A%3CLI%3EAn%20Azure%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EResource%20Group%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewith%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EOwner%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3ERole%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Epermission.%20All%20Azure%20resources%20will%20be%20deployed%20into%20this%20resource%20group.%3C%2FLI%3E%0A%3CLI%3EA%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EGitHub%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EAccount%20to%20fork%20and%20clone%20this%20GitHub%20repository.%3C%2FLI%3E%0A%3CLI%3EAn%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAzure%20DevOps%20Services%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(formerly%20Visual%20Studio%20Team%20Services)%20Account.%20You%20can%20get%20a%20free%20Azure%20DevOps%20account%20by%20accessing%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fdevops%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20DevOps%20Services%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eweb%20page.%3C%2FLI%3E%0A%3CLI%3EAn%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAzure%20Machine%20Learning%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eworkspace.%20AML%20is%20an%20enterprise-grade%20machine%20learning%20service%20to%20build%20and%20deploy%20models%20faster.%20In%20this%20project%2C%20you%20will%20use%20AML%20to%20register%20and%20retrieve%20models.%3C%2FLI%3E%0A%3CLI%3EThis%20project%20assumes%20readers%2Fattendees%20are%20familiar%20with%20Azure%20Machine%20Learning%2C%20Git%20SCM%2C%20Linux%20Containers%20(%3CEM%3Edocker%20engine%3C%2FEM%3E)%2C%20Kubernetes%2C%20DevOps%20(%3CEM%3EContinuous%20Integration%2FContinuous%20Deployment%3C%2FEM%3E)%20concepts%20and%20developing%20Microservices%20in%20one%20or%20more%20programming%20languages.%20If%20you%20are%20new%20to%20any%20of%20these%20technologies%2C%20go%20thru%20the%20resources%20below.%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fpaths%2Fbuild-ai-solutions-with-azure-ml-service%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBuild%20AI%20solutions%20with%20Azure%20Machine%20Learning%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgit-scm.com%2Fdocs%2Fgittutorial%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EIntroduction%20to%20Git%20SCM%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgit-scm.com%2Fbook%2Fen%2Fv2%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGit%20SCM%20Docs%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.docker.com%2Fengine%2Fdocker-overview%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EDocker%20Overview%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fkubernetes.io%2Fdocs%2Ftutorials%2Fkubernetes-basics%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EKubernetes%20Overview%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Foverview%2Fdevops-tutorial%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EIntroduction%20to%20Azure%20DevOps%20Services%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3E(Optional)%20Download%20and%20install%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.getpostman.com%2Fapps%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EPostman%20App%3C%2FA%3E%2C%20a%20REST%20API%20Client%20used%20for%20testing%20the%20Web%20API's.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH2%20id%3D%22toc-hId--1597908668%22%20id%3D%22toc-hId--1597908662%22%20id%3D%22toc-hId--1597908662%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-889604165%22%20id%3D%22toc-hId-889604171%22%20id%3D%22toc-hId-889604171%22%3EArchitecture%20Diagram%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20the%20architecture%20diagram%20for%20this%20solution%20template%3A%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22architecture.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277546i1A0185892698F960%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22architecture.png%22%20alt%3D%22architecture.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20easy%20and%20quick%20reference%2C%20readers%20can%20refer%20to%20the%20following%20online%20resources%20as%20needed.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.docker.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EDocker%20Documentation%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fkubernetes.io%2Fdocs%2Fhome%2F%3Fpath%3Dusers%26amp%3Bpersona%3Dapp-developer%26amp%3Blevel%3Dfoundational%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EKubernetes%20Documentation%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.helm.sh%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHelm%203.x%20Documentation%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Faks%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Kubernetes%20Service%20(AKS)%20Documentation%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcontainer-registry%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Container%20Registry%20Documentation%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fvsts%2Findex%3Fview%3Dvsts%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20DevOps%20Documentation%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Machine%20Learning%20Documentation%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20id%3D%22toc-hId--917850298%22%20id%3D%22toc-hId--917850292%22%20id%3D%22toc-hId--917850292%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-1569662535%22%20id%3D%22toc-hId-1569662541%22%20id%3D%22toc-hId-1569662541%22%3EStep%20by%20Step%20Instructions%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--2034743287%22%20id%3D%22toc-hId--2034743281%22%20id%3D%22toc-hId--2034743281%22%3ESet%20up%20Azure%20DevOps%20Project%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EGo%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fdevops%2F%3Fnav%3Dmin%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Devops%20website%3C%2FA%3E%2C%20and%20set%20up%20a%20project%20named%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAML_AKS_custom_deployment%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(Substitute%20any%20name%20as%20you%20see%20fit.)%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH3%20id%3D%22toc-hId-452769546%22%20id%3D%22toc-hId-452769552%22%20id%3D%22toc-hId-452769552%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId--1354684917%22%20id%3D%22toc-hId--1354684911%22%20id%3D%22toc-hId--1354684911%22%3ESet%20up%20Project%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EGo%20to%20Repos%20on%20the%20left%20side%2C%20and%20find%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EImport%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eunder%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EImport%20a%20repository%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277553i214DF5A2F992265D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.png%22%20alt%3D%221.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3CP%3E%26nbsp%3BUse%26nbsp%3B%3CA%20style%3D%22background-color%3A%20%23ffffff%3B%22%20href%3D%22https%3A%2F%2Fgithub.com%2FHZ-MS-CSA%2Faml_aks_generic_model_deployment%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FHZ-MS-CSA%2Faml_aks_generic_model_deployment%3C%2FA%3E%26nbsp%3Bas%20clone%20URL%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH3%20id%3D%22toc-hId-437664437%22%20id%3D%22toc-hId-437664443%22%20id%3D%22toc-hId-437664443%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId--1369790026%22%20id%3D%22toc-hId--1369790020%22%20id%3D%22toc-hId--1369790020%22%3EUpload%20AML%20Model%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20a%20demonstration%2C%20we%20will%20be%20using%20an%20onnx%20model%20from%20a%20Microsoft%20Cloud%20Workshop%20activity.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%22This%20is%20a%20classification%20model%20for%20claim%20text%20that%20will%20predict%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3E1%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eif%20the%20claim%20is%20an%20auto%20insurance%20claim%20or%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3E0%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eif%20it%20is%20a%20home%20insurance%20claim.%20The%20model%20will%20be%20built%20using%20a%20type%20of%20Deep%20Neural%20Network%20(DNN)%20called%20the%20Long%20Short-Term%20Memory%20(LSTM)%20recurrent%20neural%20network%20using%20TensorFlow%20via%20the%20Keras%20library.%22%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FMCW-Cognitive-services-and-deep-learning%2Fblob%2Fmain%2FHands-on%2520lab%2Fnotebooks%2F03%2520Claim%2520Classification.ipynb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESource%20here.%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EFor%20step%20by%20step%20guidance%20on%20how%20to%20create%20and%20train%20this%20model%2C%20please%20see%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FMCW-Cognitive-services-and-deep-learning%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMCW%20workshop%20here.%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EFor%20your%20convenience%2C%20you%20can%20find%20the%20onnx%20model%20under%20sample_model%2Fclaim_classifer.zip%3C%2FLI%3E%0A%3CLI%3EDownload%20and%20unzip%20the%20file%2C%20and%20upload%20the%20onnx%20model%20to%20Azure%20ML%20workspace%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%222.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277556i463A47EFCD1F73A9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222.png%22%20alt%3D%222.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH3%20id%3D%22toc-hId-1117722807%22%20id%3D%22toc-hId-1117722813%22%20id%3D%22toc-hId-1117722813%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId--689731656%22%20id%3D%22toc-hId--689731650%22%20id%3D%22toc-hId--689731650%22%3EModify%20Azure%20DevOps%20Repo%20Content%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20two%20files%20that%20need%20to%20be%20modified%20to%20accommodate%20the%20onnx%20model%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CSTRONG%3E.%2Fmain-generic.py%3C%2FSTRONG%3E%3A%20This%20is%20essentially%20a%20scoring%20entry%20script%20that%20calls%20AML%20SDK%2C%20retrieve%20the%20model%20from%20the%20registry%2C%20and%20wrap%20it%20in%20a%20flask%20API.%20The%20original%20main-generic.py%20is%20a%20template%2C%20and%20you%20can%20add%20any%20relevant%20codes%20to%20execute%20the%20model%20in%20this%20file.%20Please%20replace%20the%20content%20of%20this%20file%20with%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E.%2Fsample_model%2Fmain-generic.py%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(An%20example%20of%20how%20to%20customize%20this%20python%20script)%3COL%3E%0A%3CLI%3E%3CSTRONG%3E.%2Fsample_model%2Fmain-generic.py%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20an%20adapted%20version%20of%20the%20original%20MCW-Cognitive%20services%20and%20deep%20learning%20Claim%20Classification%20Jupyter%20Notebook.%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FMCW-Cognitive-services-and-deep-learning%2Fblob%2Fmain%2FHands-on%2520lab%2Fnotebooks%2F03%2520Claim%2520Classification.ipynb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EPlease%20see%20source%20here.%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3E.%2Fproject_env.yml%3C%2FSTRONG%3E%3A%20This%20specifies%20the%20dependencies%20required%20for%20the%20model%20to%20execute.%20Please%20replace%20the%20content%20of%20this%20file%20with%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E.%2Fsample_model%2Fproject_env.yml%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(An%20example%20of%20how%20to%20customize%20this%20yml%20file)%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH3%20id%3D%22toc-hId-1797781177%22%20id%3D%22toc-hId-1797781183%22%20id%3D%22toc-hId-1797781183%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId--9673286%22%20id%3D%22toc-hId--9673280%22%20id%3D%22toc-hId--9673280%22%3ESet%20up%20Build%20Pipeline%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ECreate%20a%20pipeline%20by%20using%20the%20classical%20editor.%20Select%20your%20Azure%20Repos%20Git%20as%20source.%20Then%20start%20with%20an%20empty%20job.%3C%2FLI%3E%0A%3CLI%3EChange%20the%20agent%20specification%20as%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eubuntu-18.04%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(same%20for%20release%20pipeline%20as%20well)%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ECopy%20Files%20Activity%3C%2FSTRONG%3E%3A%20Configure%20the%20activity%20based%20on%20the%20screenshot%20below%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%223.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277558i2122F2CE5C797F6F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%223.png%22%20alt%3D%223.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3CSTRONG%3EDocker-Build%20an%20Image%3C%2FSTRONG%3E%3CSPAN%3E%3A%20Configure%20the%20activity%20based%20on%20the%20notes%20and%20screenshot%20below%3C%2FSPAN%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EChange%20task%20version%20to%20be%200.*%3C%2FLI%3E%0A%3CLI%3ESelect%20an%20Azure%20container%20registry%2C%20and%20authorize%20Azure%20Devops's%20Azure%20connection%3C%2FLI%3E%0A%3CLI%3EIn%20the%20%22Docker%20File%22%20section%2C%20select%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EDockerfile%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20Azure%20Devops%20repo%3C%2FLI%3E%0A%3CLI%3ELeave%20everything%20else%20as%20default%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%224.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277562i73D617063A9266E7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%224.png%22%20alt%3D%224.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%225.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277563i2868737FA31025D5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%225.png%22%20alt%3D%225.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%20style%3D%22font-family%3A%20inherit%3B%22%3EDocker-Push%20an%20Image%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%3A%20Configure%20the%20activity%20based%20on%20the%20notes%20and%20screenshot%20below%3C%2FSPAN%3E%3COL%3E%0A%3CLI%3EChange%20task%20version%20to%20be%200.*%3C%2FLI%3E%0A%3CLI%3ESelect%20the%20same%20ACR%20as%20Build%20an%20Image%20step%20above%3C%2FLI%3E%0A%3CLI%3ELeave%20everything%20else%20as%20default%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%226.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277564iCD4B7F51A0176365%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%226.png%22%20alt%3D%226.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%227.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277565iEC93C624DCCC0008%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%227.png%22%20alt%3D%227.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3E%3CSTRONG%3EPublish%20Build%20Artifact%3C%2FSTRONG%3E%3CSPAN%3E%3A%20Leave%20everything%20as%20default%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%228.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277566iE26427703F358392%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%228.png%22%20alt%3D%228.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3BSave%20and%20queue%20the%20build%20pipeline.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH3%20id%3D%22toc-hId--1817127749%22%20id%3D%22toc-hId--1817127743%22%20id%3D%22toc-hId--1817127743%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-670385084%22%20id%3D%22toc-hId-670385090%22%20id%3D%22toc-hId-670385090%22%3ESet%20up%20Release%20Pipeline%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CP%3EStart%20with%20an%20empty%20job%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3EChange%20Stage%20name%20to%20be%20AKS-Cluster-Release%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%229.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277570i595C2262873AB531%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%229.png%22%20alt%3D%229.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%3CSPAN%3EAdd%20build%20artifact%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2210.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277571iC2156FDD223B23E2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2210.png%22%20alt%3D%2210.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CP%3ESet%20up%20continuous%20deployment%20trigger--the%20release%20pipeline%20will%20be%20automatically%20kicked%20off%20every%20time%20a%20build%20pipeline%20is%20modified%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2211.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277572iE4A32FDF537F8888%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2211.png%22%20alt%3D%2211.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CP%3E%3CSTRONG%3Ehelm%20upgrade%3C%2FSTRONG%3E%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EPackage%20and%20deploy%20helm%20charts%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eactivity.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ESelect%20an%20appropriate%20AKS%20cluster%3C%2FLI%3E%0A%3CLI%3EEnter%20a%20custom%20namespace%20for%20this%20release.%20For%20this%20demo%2C%20the%20namespace%20is%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3Eaml-aks-onnx%3C%2FEM%3E%3C%2FLI%3E%0A%3CLI%3ECommand%20is%20%22upgrade%22%3C%2FLI%3E%0A%3CLI%3EChart%20type%20is%20%22File%20path%22.%20Chart%20path%20is%20shown%20in%20the%20screenshot%20below%3C%2FLI%3E%0A%3CLI%3ESet%20release%20name%20as%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3Eaml-aks-onnx-1%3C%2FEM%3E%3C%2FLI%3E%0A%3CLI%3EMake%20sure%20to%20select%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EInstall%20if%20not%20present%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Ewait%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EGo%20to%20your%20Azure%20Container%20Registry%2C%20and%20find%20Login%20server%20URL.%20Your%20Image%20repository%20path%20is%20LOGIN_SERVER_URL%2FREPOSITORY_NAME.%3C%2FLI%3E%0A%3CLI%3EIn%20arguments%2C%20enter%20the%20following%20content%3A%26nbsp%3B%3CP%3E%3CCODE%3E--create-namespace%20--set%20image.repository%3DIMAGE_REPOSITORY_PATH%20--set%20image.tag%3D%24(Build.BuildId)%20--set%20amlargs.azureTenantId%3D%24(TenantId)%20--set%20amlargs.azureSubscriptionId%3D%24(SubscriptionId)%20--set%20amlargs.azureResourceGroupName%3D%24(ResourceGroup)%20--set%20amlargs.azureMlWorkspaceName%3D%24(WorkspaceName)%20--set%20amlargs.azureMlServicePrincipalClientId%3D%24(ClientId)%20--set%20amlargs.azureMlServicePrincipalPassword%3D%24(ClientSecret)%3C%2FCODE%3E%3C%2FP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2212.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277573i0BC8C1196F824344%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2212.png%22%20alt%3D%2212.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2213.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277574i351B88FF14E2CB07%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2213.png%22%20alt%3D%2213.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2214.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277575iBA6DA24ABFDCD153%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2214.png%22%20alt%3D%2214.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2215.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277576i20DE5E2BEF354532%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2215.png%22%20alt%3D%2215.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3EIn%20Variables%2FPipeline%20Variables%2C%20create%20and%20enter%20the%20following%20required%20values%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EClientId%3A%20Follow%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fdevelop%2Fhowto-create-service-principal-portal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EHow%20to%3A%20Use%20the%20portal%20to%20create%20an%20Azure%20AD%20application%20and%20service%20principal%20that%20can%20access%20resources%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%20create%20a%20service%20principal%20that%20can%20access%20Azure%20ML%20workspace%3C%2FLI%3E%0A%3CLI%3EClientSecret%3A%20See%20the%20instruction%20for%20ClientId%3C%2FLI%3E%0A%3CLI%3EResourceGroup%3A%20Resource%20Group%20for%20AML%20workspace%3C%2FLI%3E%0A%3CLI%3ESubscriptionId%3A%20Can%20be%20found%20on%20AML%20worksapce%20overview%20page.%3C%2FLI%3E%0A%3CLI%3ETenantId%3A%20Can%20be%20found%20in%20Azure%20Activate%20Directory%3C%2FLI%3E%0A%3CLI%3EWorkspaceName%3A%20AML%20workspace%20name%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2216.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277577i556F118ED971B86D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2216.png%22%20alt%3D%2216.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3E%3CSPAN%3ESave%2C%20create%2C%20and%20deploy%20release%3C%2FSPAN%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2217.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277578i8DD54BF656974B17%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2217.png%22%20alt%3D%2217.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2218.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277580i3507C5E399C37208%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2218.png%22%20alt%3D%2218.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH2%20id%3D%22toc-hId--1266152098%22%20id%3D%22toc-hId--1266152092%22%20id%3D%22toc-hId--1266152092%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-1221360735%22%20id%3D%22toc-hId-1221360741%22%20id%3D%22toc-hId-1221360741%22%3ETesting%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ERetrieve%20external%20IP%20for%20deployed%20service%3COL%3E%0A%3CLI%3EOpen%20powershell%3C%2FLI%3E%0A%3CLI%3E%3CCODE%3Eaz%20account%20set%20--subscription%20SUBSCRIPTION_ID%3C%2FCODE%3E%3C%2FLI%3E%0A%3CLI%3E%3CCODE%3Eaz%20aks%20get-credentials%20--resource-group%20RESOURCE_GROUP_NAME%20--name%20AKS_CLUSTER_NAME%3C%2FCODE%3E%3C%2FLI%3E%0A%3CLI%3E%3CCODE%3Ekubectl%20get%20deployments%20--all-namespaces%3Dtrue%3C%2FCODE%3E%3C%2FLI%3E%0A%3CLI%3EFind%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3Eaml-aks-onnx%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Enamespace%2C%20make%20sure%20it's%20ready%3C%2FLI%3E%0A%3CLI%3E%3CCODE%3Ekubectl%20get%20svc%20--namespace%20aml-aks-onnx%3C%2FCODE%3E.%20External%20IP%20will%20be%20listed%20there%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3CLI%3EUse%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FHZ-MS-CSA%2Faml_aks_generic_model_deployment%2Fblob%2Fmain%2Ftest.ipynb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Etest.ipynb%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%20test%20it%20out%3COL%3E%0A%3CLI%3Eendpoint%20is%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3Ehttp%3A%2F%2FEXTERNAL_IP%3A80%2Fscore%3C%2FCODE%3E.%20You%20can%20optionally%20set%20it%20to%20be%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3Ehttp%3A%2F%2FEXTERNAL_IP%3A80%2Fhealthcheck%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%20then%20use%20the%20get%20method%20to%20do%20a%20quick%20health%20check%3C%2FLI%3E%0A%3CLI%3EIn%20the%20post%20method%20section%2C%20make%20sure%20to%20enter%20the%20model%20name.%20In%20this%20demo%2C%20the%20model%20name%20is%20claim_classifier_onnx_demo.%20Enter%20any%20potential%20insurance%20claim%20text%2C%20and%20see%20the%20model%20classifies%20it%20into%20auto%20or%20home%20insurance%20claim%20in%20real%20time.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2219.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277583iBF940927172F74FE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2219.png%22%20alt%3D%2219.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%2220.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277584i652EB2875C98015D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2220.png%22%20alt%3D%2220.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH2%20id%3D%22toc-hId-112068213%22%20id%3D%22toc-hId-112068219%22%20id%3D%22toc-hId-112068219%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--1695386250%22%20id%3D%22toc-hId--1695386244%22%20id%3D%22toc-hId--1695386244%22%3ELicense%3C%2FH2%3E%0A%3CP%3EMIT%20License%3C%2FP%3E%0A%3CP%3ECopyright%20(c)%202021%20HZ-MS-CSA%3C%2FP%3E%0A%3CP%3EPermission%20is%20hereby%20granted%2C%20free%20of%20charge%2C%20to%20any%20person%20obtaining%20a%20copy%20of%20this%20software%20and%20associated%20documentation%20files%20(the%20%22Software%22)%2C%20to%20deal%20in%20the%20Software%20without%20restriction%2C%20including%20without%20limitation%20the%20rights%20to%20use%2C%20copy%2C%20modify%2C%20merge%2C%20publish%2C%20distribute%2C%20sublicense%2C%20and%2For%20sell%20copies%20of%20the%20Software%2C%20and%20to%20permit%20persons%20to%20whom%20the%20Software%20is%20furnished%20to%20do%20so%2C%20subject%20to%20the%20following%20conditions%3A%3C%2FP%3E%0A%3CP%3EThe%20above%20copyright%20notice%20and%20this%20permission%20notice%20shall%20be%20included%20in%20all%20copies%20or%20substantial%20portions%20of%20the%20Software.%3C%2FP%3E%0A%3CP%3ETHE%20SOFTWARE%20IS%20PROVIDED%20%22AS%20IS%22%2C%20WITHOUT%20WARRANTY%20OF%20ANY%20KIND%2C%20EXPRESS%20OR%20IMPLIED%2C%20INCLUDING%20BUT%20NOT%20LIMITED%20TO%20THE%20WARRANTIES%20OF%20MERCHANTABILITY%2C%20FITNESS%20FOR%20A%20PARTICULAR%20PURPOSE%20AND%20NONINFRINGEMENT.%20IN%20NO%20EVENT%20SHALL%20THE%20AUTHORS%20OR%20COPYRIGHT%20HOLDERS%20BE%20LIABLE%20FOR%20ANY%20CLAIM%2C%20DAMAGES%20OR%20OTHER%20LIABILITY%2C%20WHETHER%20IN%20AN%20ACTION%20OF%20CONTRACT%2C%20TORT%20OR%20OTHERWISE%2C%20ARISING%20FROM%2C%20OUT%20OF%20OR%20IN%20CONNECTION%20WITH%20THE%20SOFTWARE%20OR%20THE%20USE%20OR%20OTHER%20DEALINGS%20IN%20THE%20SOFTWARE.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2318919%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20blog%20article%20provides%20step-by-step%20instructions%20to%20use%26nbsp%3B%3CSTRONG%3EAzure%20DevOps%20Services%3C%2FSTRONG%3E%26nbsp%3Bto%20build%20the%20application%20binaries%2C%20package%20the%20binaries%20within%20a%20container%20and%20deploy%20the%20container%20on%26nbsp%3B%3CSTRONG%3EAzure%20Kubernetes%20Service%3C%2FSTRONG%3E%26nbsp%3B(AKS).%20The%20deployed%20microservice%20exposes%20a%20Web%20API%20(REST%20interface)%20and%20supports%20invoking%20a%20model%20registered%20in%26nbsp%3B%3CSTRONG%3EAzure%20Machine%20Learning%3C%2FSTRONG%3E%26nbsp%3Bworkspace%20and%20running%20inference%20task%20on%20it.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2318919%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Machine%20Learning%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMachine%20Learning%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMLOps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2325032%22%20slang%3D%22en-US%22%3ERe%3A%20Solution%20Template%20for%20Deploying%20Azure%20ML%20Models%20to%20AKS%20Clusters%20via%20Azure%20DevOps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2325032%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F695747%22%20target%3D%22_blank%22%3E%40Han_Zhang_CSA%3C%2FA%3E%26nbsp%3Bfor%20Sharing%20this%20Awesome%20blog%20with%20the%20Community%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2F%40A027B0AAF3CA617A1E2E22C4E761B2FE%2Fimages%2Femoticons%2Fstareyes_40x40.gif%22%20alt%3D%22%3Astareyes%3A%22%20title%3D%22%3Astareyes%3A%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Version history
Last update:
‎May 03 2021 01:54 PM
Updated by: