Set up the Visual Studio Code Azure Machine Learning extension (preview)

Learn how to set up the Azure Machine Learning Visual Studio Code extension for your machine learning workflows.

VS Code Extension

The Azure Machine Learning extension for VS Code provides a user interface to:

  • Manage Azure Machine Learning resources (experiments, virtual machines, models, deployments, etc.)
  • Develop locally using remote compute instances
  • Train machine learning models
  • Debug machine learning experiments locally
  • Schema-based language support, autocompletion and diagnostics for specification file authoring
  • Snippets for common tasks


Install the extension

  1. Open Visual Studio Code.

  2. Select Extensions icon from the Activity Bar to open the Extensions view.

  3. In the Extensions view, search for "Azure Machine Learning".

  4. Select Install.

    Install Azure Machine Learning VS Code Extension


Alternatively, you can install the Azure Machine Learning extension via the Visual Studio Marketplace by downloading the installer directly.

The rest of the steps in this tutorial have been tested with the latest version of the extension.


The Azure Machine Learning VS Code extension uses the CLI (v2) by default. To switch to the 1.0 CLI, set the azureML.CLI Compatibility Mode setting in Visual Studio Code to 1.0. For more information on modifying your settings in Visual Studio, see the user and workspace settings documentation.

Sign in to your Azure Account

In order to provision resources and run workloads on Azure, you have to sign in with your Azure account credentials. To assist with account management, Azure Machine Learning automatically installs the Azure Account extension. Visit the following site to learn more about the Azure Account extension.

To sign into you Azure account, select the Azure: Sign In button on the Visual Studio Code status bar to start the sign in process.

Alternatively, use the command palette:

  1. Open the command palette by selecting View > Command Palette from the menu bar.
  2. Enter the command "> Azure: Sign In" into the command palette to start the sign in process.

Choose your default workspace

Choosing a default Azure Machine Learning workspace enables the following when authoring CLI (v2) YAML specification files:

  • Schema validation
  • Autocompletion
  • Diagnostics

If you don't have a workspace, create one. For more information, see manage Azure Machine Learning resources with the VS Code extension.

To choose your default workspace, select the Set Azure ML Workspace button on the Visual Studio Code status bar and follow the prompts to set your workspace.

Alternatively, use the > Azure ML: Set Default Workspace command in the command palette and follow the prompts to set your workspace.

Next Steps