MLOps using Azure ML Services and Azure DevOps
Перейти к файлу
Praneet Singh Solanki 1249e6b449 doc: correct readme initial commit 2019-03-29 14:01:33 -04:00
aml_config Update config.json 2019-03-28 10:56:12 -04:00
aml_service Update 34-GetScoringImageName.py 2019-03-27 18:02:41 -04:00
azure-pipeline-yaml bugfix: retraining pipeline 2019-03-19 17:57:36 -04:00
code Fixing merge conflicts 2019-03-28 11:19:11 -04:00
data initial commit 2019-01-23 18:20:57 -05:00
docs doc: added reference architecture diagram 2019-03-29 14:00:59 -04:00
environment_setup Adding pytest as required package to run test, missed adding it earlier 2019-02-21 13:34:59 -05:00
model initial commit 2019-01-23 18:20:57 -05:00
tests/unit Fixing merge conflicts 2019-03-28 11:19:11 -04:00
.gitignore gitignore: ignore vscode config 2019-02-15 14:58:39 -05:00
LICENSE Initial commit 2019-01-29 11:48:08 -08:00
README.md doc: correct readme initial commit 2019-03-29 14:01:33 -04:00
azure-pipelines.yml Update azure-pipelines.yml for Azure Pipelines [skip ci] 2019-03-27 14:52:44 -04:00

README.md

Author: | Praneet Singh Solanki | Richin Jain |

DevOps For AI

Build Status

DevOps for AI will help you to understand how to build the Continuous Integration and Continuous Delivery pipeline for a ML/AI project. We will be using the Azure DevOps Project for build and release/deployment pipelines along with Azure ML services for model retraining pipeline, model management and operationalization.

This template contains code and pipeline definition for a machine learning project demonstrating how to automate the end to end ML/AI project. The build pipelines include DevOps tasks for data sanity test, unit test, model training on different compute targets, model version management, model evaluation/model selection, model deployment as realtime web service, staged deployment to QA/prod, integration testing and functional testing.

Prerequisite

  • Active Azure subscription
  • At least contributor access to Azure subscription

Getting Started:

Skip above step if already done.

Once the template is imported for personal Azure DevOps account using DevOps demo generator, you need to follow below steps to get the pipeline running:

Architecture Diagram

This reference architecture shows how to implement continuous integration (CI), continuous delivery (CD), and retraining pipeline for an AI application using Azure DevOps and Azure Machine Learning. The solution is built on the scikit-learn diabetes dataset but can be easily adapted for any AI scenario and other popular build systems such as Jenkins and Travis.

Architecture

Architecture Flow

  1. Data Scientist writes/updates the code and push it to git repo. This triggers the Azure DevOps build pipeline (contineous integration).

  2. Once the Azure DevOps build pipeline is triggered, it runs following type of tasks:

    • Run for new code: Everytime new code is commited to the repo, build pipeline performs data sanity test and unit tests the new code.

    • One-time run: These tasks runs only for the first time build pipeline run, they create Azure ML Service Workspace, Azure ML Compute used as model training compute and publish a Azure ML Pipeline with code. This published Azure ML pipeline is the model training/retraining pipeline.

    Note: The task Publish Azure ML pipeline currently runs for every code change

  3. The Azure ML Retraining pipeline is triggered once the Azure DevOps build pipeline completes. All the tasks in this pipeline runs on Azure ML Compute created earlier. Following are the tasks in this pipeline:

    • Train Model task executes model training script on Azure ML Compute. It outputs a model file which is stored in the run history

    • Evaluate Model task evaluates the performance of newly trained model with the model in production. If new trained model performs better than the production model, next steps are executed. Else next steps are skipped.

    • Register Model task takes the new trained better performing model and registers it with the Azure ML Model registry to version control it.

    • Package Model task packages the new trained model along with scoring file and python dependencies into a docker image and pushes it to Azure Container Registry. This image is used to deploy model as web service.

  4. Once a new model scoring image is pushed to Azure Container Registry, Azure DevOps Release/Deployment pipeline is triggered. This pipeline deploys the model scoring image into Staging/QA and PROD environments.

    • In the Staging/QA, one task creates Azure Container Instance and deploy scoring image as web service on it.

    • The second task test this web service by calling its REST endpoint with dummy data.

Repo Details

You can find the details of the code and scripts in the repository here

References

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.