Member-only story

Azure Machine Learning CLI 2.0 (v2)

Caio Moreno
2 min readDec 1, 2021

--

At Microsoft Build 2021 we launched the public preview of 2.0 CLI and REST APIs for Azure Machine Learning, enabling users to accelerate the iterative model training and deployment process while tracking the model lifecycle, enabling a complete ML Ops experience.

Try it now using this step by step guide

caiomsouza/aml-cli-v2-in-a-day: Azure Machine Learning CLI V2 Demo (github.com)

What’s new?

The ml extension to the Azure CLI is the improved interface for Azure Machine Learning users. It enables you to train and deploy models from the command line, with features that accelerate scaling the data science process up and out, all while tracking the model lifecycle.

Using the CLI enables you to run distributed training jobs on GPU compute, automatically sweep hyperparameters to improve your results, and then monitor jobs in the AML studio user interface to see all details including important metrics, metadata and artefacts like the trained model, checkpoints and logs.

Additionally, the CLI is optimized to support YAML-based job, endpoint, and asset specifications to enable users to create, manage, and deploy models with proper CI/CD (or GitOps) best practices for an end-to-end MLOps solution.

To get started with the 2.0 machine learning CLI extension for Azure, please check the link here .

Job

A job in Azure ML enables you to prepare and train machine learning models. It enables you to configure:

  • What to run: your code
  • How to run it: either an optimized prebuilt docker container from AML or one of your choice from your own docker registry
  • Where to run it: either fully managed, scalable compute in Azure or locally on your desktop

Train a machine learning model by creating a training job

Here is an example training job which invokes the user’s python script from a local directory and automatically mounts data in Azure Storage.

OSS-based examples for training and deployment

Azure ML is announcing a new set of YAML-based examples for training and deploying models using popular open-source libraries like PyTorch, LightGBM, FastAI, R, and TensorFlow. All examples leverage open-source logging via the MLFlow library and do not require Azure-specific code inside of the user training script.

Examples are tested and validated using GitHub Actions against the latest Azure ML release. Official documentation on docs.microsoft.com leverages these tested snippets to ensure a smooth, working experience for users to get started.

You can find the new examples here: azureml-examples/cli at main · Azure/azureml-examples (github.com) .

--

--

Caio Moreno
Caio Moreno

Written by Caio Moreno

Solutions Architect @databricks | Professor | PhD | Ex-Microsoft | Ex-Avanade/Accenture | Ex-Pentaho/Hitachi | Ex-AOL | Ex-IT4biz CEO. (Opinions are my own)

Responses (1)

Write a response