Search code examples
azureazure-devopsazure-machine-learning-service

How do I version control Azure ML workspaces with custom environments and pipelines?


I'm trying to figure out how viable Azure ML in production; I would like to accomplish the following:

  1. Specify custom environments for my pipelines using a pip file and use them in a pipeline
  2. Declaratively specify my workspace, environments and pipelines in an Azure DevOps repo
  3. Reproducibly deploy my Azure ML workspace to my subscription using an Azure DevOps pipeline

I found an explanation of how to specify environments using notebooks but this seems ill-suited for the second and third requirements I have.


Solution

  • Currently, we have a python script, pipeline.py that uses the azureml-sdkto create, register and run all of our ML artifacts (envs, pipelines, models). We call this script in our Azure DevOps CI pipeline with a Python Script task after building the right pip env from the requirements file in our repo.

    However, it is worth noting there is YAML support for ML artifact definition. Though I don't know if the existing support will cover all of your bases (though that is the plan).

    Here's some great docs from MSFT to get you started: