Vscode Visual Studio



VSCode Extension to Fix Checksums. An extension to to adjust checksums after changes to VSCode core files. Once the checksum changes are applied and VSCode is restarted, all warning about core file modifications will disappear, such as the display of Unsupported in the title-bar, or the following dialog on start-up. Manual Installation inside VSCode. MacOS: Press Cmd+P in your Visual Studio Code, type in ext install Tabnine.tabnine-vscode and press Enter. Windows: Press Ctrl+P in your Visual Studio Code, type in ext install Tabnine.tabnine-vscode and press Enter. Click the Reload button in the extensions tab.

-->

Learn how to install and run scripts using the Azure Machine Learning Visual Studio Code extension.

In this tutorial, you learn the following tasks:

  • Install the Azure Machine Learning Visual Studio Code extension
  • Sign into your Azure account from Visual Studio Code
  • Use the Azure Machine Learning extension to run a sample script

Prerequisites

  • Azure subscription. If you don't have one, sign up to try the free or paid version of Azure Machine Learning.
  • Visual Studio Code. If you don't have it, install it.

Install the extension

Community
  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.

Note

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 version 0.6.8 of the extension.

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.

  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.

Run a machine learning model training script in Azure

Now that you have signed into Azure with your account credentials, Use the steps in this section to learn how to use the extension to train a machine learning model.

  1. Download and unzip the VS Code Tools for AI repository anywhere on your computer.

  2. Open the mnist-vscode-docs-sample directory in Visual Studio Code.

  3. Select the Azure icon in the Activity Bar.

  4. Select the Run Experiment icon at the top of the Azure Machine Learning View.

  5. When the command palette expands, follow the prompts.

    Note

    If you already have existing Azure Machine Learning resources provisioned, see how to run experiments in VS Code guide.

    1. Select your Azure subscription.
    2. From the list of environments, select Conda dependencies file.
    3. Press Enter to browse the Conda dependencies file. This file contains the dependencies required to run your script. In this case, the dependencies file is the env.yml file inside the mnist-vscode-docs-sample directory.
    4. Press Enter to browse the training script file. This is the file that contains code to a machine learning model that categorize images of handwritten digits. In this case, the script to train the model is the train.py file inside the mnist-vscode-docs-sample directory.
  6. At this point, a configuration file similar to the one below appears in the text editor. The configuration contains the information required to run the training job like the file that contains the code to train the model and any Python dependencies specified in the previous step.

  7. Once you're satisfied with your configuration, submit your experiment by opening the command palette and entering the following command:

    This sends the train.py and configuration file to your Azure Machine Learning workspace. The training job is then started on a compute resource in Azure.

Track the progress of the training script

Vscode Visual Studio Windows Debugger

Running your script can take several minutes. To track its progress:

  1. Select the Azure icon from the activity bar.

  2. Expand your subscription node.

  3. Expand your currently running experiment's node. This is located inside the {workspace}/Experiments/{experiment} node where the values for your workspace and experiment are the same as the properties defined in the configuration file.

  4. All of the runs for the experiment are listed, as well as their status. To get the most recent status, click the refresh icon at the top of the Azure Machine Learning View.

Download the trained model

When the experiment run is complete, the output is a trained model. To download the outputs locally:

  1. Right-click the most recent run and select Download Outputs.

  2. Select a location where to save the outputs to.

  3. A folder with the name of your run is downloaded locally. Navigate to it.

  4. The model files are inside the outputs/outputs/model directory.

Vscode Visual Studio Download

Next steps

Vscode

Vscode Visual Studio Difference

  • Tutorial: Train and deploy an image classification TensorFlow model using the Azure Machine Learning Visual Studio Code Extension.