Rediger

Del via


Manage Azure Machine Learning resources with the VS Code Extension (preview)

Learn how to manage Azure Machine Learning resources with the VS Code extension.

Important

This feature is currently in public preview. This preview version is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities.

For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

Azure Machine Learning VS Code Extension

Prerequisites

Create resources

The quickest way to create resources is using the extension's toolbar.

  1. Open the Azure Machine Learning view.
  2. Select + in the activity bar.
  3. Choose your resource from the dropdown list.
  4. Configure the specification file. The information required depends on the type of resource you want to create.
  5. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, you can create a resource by using the command palette:

  1. Open the command palette View > Command Palette
  2. Enter > Azure ML: Create <RESOURCE-TYPE> into the text box. Replace RESOURCE-TYPE with the type of resource you want to create.
  3. Configure the specification file.
  4. Open the command palette View > Command Palette
  5. Enter > Azure ML: Create Resource into the text box.

Version resources

Some resources like environments, and models allow you to make changes to a resource and store the different versions.

To version a resource:

  1. Use the existing specification file that created the resource or follow the create resources process to create a new specification file.
  2. Increment the version number in the template.
  3. Right-click the specification file and select AzureML: Execute YAML.

As long as the name of the updated resource is the same as the previous version, Azure Machine Learning picks up the changes and creates a new version.

Workspaces

For more information, see workspaces.

Create a workspace

  1. In the Azure Machine Learning view, right-click your subscription node and select Create Workspace.
  2. A specification file appears. Configure the specification file.
  3. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, use the > Azure ML: Create Workspace command in the command palette.

Remove workspace

  1. Expand the subscription node that contains your workspace.
  2. Right-click the workspace you want to remove.
  3. Select whether you want to remove:
    • Only the workspace: This option deletes only the workspace Azure resource. The resource group, storage accounts, and any other resources the workspace was attached to are still in Azure.
    • With associated resources: This option deletes the workspace and all resources associated with it.

Alternatively, use the > Azure ML: Remove Workspace command in the command palette.

Datastores

The extension currently supports datastores of the following types:

  • Azure Blob
  • Azure Data Lake Gen 1
  • Azure Data Lake Gen 2
  • Azure File

For more information, see datastore.

For more information, see datastore.

Create a datastore

  1. Expand the subscription node that contains your workspace.
  2. Expand the workspace node you want to create the datastore under.
  3. Right-click the Datastores node and select Create Datastore.
  4. Choose the datastore type.
  5. A specification file appears. Configure the specification file.
  6. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, use the > Azure ML: Create Datastore command in the command palette.

Manage a datastore

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Datastores node inside your workspace.
  4. Right-click the datastore you want to:
    • Unregister Datastore. Removes datastore from your workspace.
    • View Datastore. Display read-only datastore settings

Alternatively, use the > Azure ML: Unregister Datastore and > Azure ML: View Datastore commands respectively in the command palette.

Datasets

The extension currently supports the following dataset types:

  • Tabular: Allows you to materialize data into a DataFrame.
  • File: A file or collection of files. Allows you to download or mount files to your compute.

For more information, see datasets

Create dataset

  1. Expand the subscription node that contains your workspace.
  2. Expand the workspace node you want to create the dataset under.
  3. Right-click the Datasets node and select Create Dataset.
  4. A specification file appears. Configure the specification file.
  5. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, use the > Azure ML: Create Dataset command in the command palette.

Manage a dataset

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Datasets node.
  4. Right-click the dataset you want to:
    • View Dataset Properties. Lets you view metadata associated with a specific dataset. If you have multiple versions of a dataset, you can choose to only view the dataset properties of a specific version by expanding the dataset node and performing the same steps described in this section on the version of interest.
    • Preview dataset. View your dataset directly in the VS Code Data Viewer. Note that this option is only available for tabular datasets.
    • Unregister dataset. Removes a dataset and all versions of it from your workspace.

Alternatively, use the > Azure ML: View Dataset Properties and > Azure ML: Unregister Dataset commands respectively in the command palette.

Environments

For more information, see environments.

Create environment

  1. Expand the subscription node that contains your workspace.
  2. Expand the workspace node you want to create the datastore under.
  3. Right-click the Environments node and select Create Environment.
  4. A specification file appears. Configure the specification file.
  5. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, use the > Azure ML: Create Environment command in the command palette.

View environment configurations

To view the dependencies and configurations for a specific environment in the extension:

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Environments node.
  4. Right-click the environment you want to view and select View Environment.

Alternatively, use the > Azure ML: View Environment command in the command palette.

Experiments

For more information, see experiments.

Create job

The quickest way to create a job is by clicking the Create Job icon in the extension's activity bar.

Using the resource nodes in the Azure Machine Learning view:

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Right-click the Experiments node in your workspace and select Create Job.
  4. Choose your job type.
  5. A specification file appears. Configure the specification file.
  6. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, use the > Azure ML: Create Job command in the command palette.

View job

To view your job in Azure Machine Learning studio:

  1. Expand the subscription node that contains your workspace.
  2. Expand the Experiments node inside your workspace.
  3. Right-click the experiment you want to view and select View Experiment in Studio.
  4. A prompt appears asking you to open the experiment URL in Azure Machine Learning studio. Select Open.

Alternatively, use the > Azure ML: View Experiment in Studio command respectively in the command palette.

Track job progress

As you're running your job, you may want to see its progress. To track the progress of a job in Azure Machine Learning studio from the extension:

  1. Expand the subscription node that contains your workspace.
  2. Expand the Experiments node inside your workspace.
  3. Expand the job node you want to track progress for.
  4. Right-click the job and select View Job in Studio.
  5. A prompt appears asking you to open the job URL in Azure Machine Learning studio. Select Open.

Download job logs & outputs

Once a job is complete, you may want to download the logs and assets such as the model generated as part of a job.

  1. Expand the subscription node that contains your workspace.
  2. Expand the Experiments node inside your workspace.
  3. Expand the job node you want to download logs and outputs for.
  4. Right-click the job:
    • To download the outputs, select Download outputs.
    • To download the logs, select Download logs.

Alternatively, use the > Azure ML: Download Outputs and > Azure ML: Download Logs commands respectively in the command palette.

Compute instances

For more information, see compute instances.

Create compute instance

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Compute node.
  4. Right-click the Compute instances node in your workspace and select Create Compute.
  5. A specification file appears. Configure the specification file.
  6. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, use the > Azure ML: Create Compute command in the command palette.

Connect to compute instance

To use a compute instance as a development environment or remote Jupyter server, see Connect to a compute instance.

Stop or restart compute instance

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Compute instances node inside your Compute node.
  4. Right-click the compute instance you want to stop or restart and select Stop Compute instance or Restart Compute instance respectively.

Alternatively, use the > Azure ML: Stop Compute instance and Restart Compute instance commands respectively in the command palette.

View compute instance configuration

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Compute instances node inside your Compute node.
  4. Right-click the compute instance you want to inspect and select View Compute instance Properties.

Alternatively, use the AzureML: View Compute instance Properties command in the command palette.

Delete compute instance

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Compute instances node inside your Compute node.
  4. Right-click the compute instance you want to delete and select Delete Compute instance.

Alternatively, use the AzureML: Delete Compute instance command in the command palette.

Compute clusters

For more information, see training compute targets.

Create compute cluster

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Compute node.
  4. Right-click the Compute clusters node in your workspace and select Create Compute.
  5. A specification file appears. Configure the specification file.
  6. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, use the > Azure ML: Create Compute command in the command palette.

View compute configuration

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Compute clusters node inside your Compute node.
  4. Right-click the compute you want to view and select View Compute Properties.

Alternatively, use the > Azure ML: View Compute Properties command in the command palette.

Delete compute cluster

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Compute clusters node inside your Compute node.
  4. Right-click the compute you want to delete and select Remove Compute.

Alternatively, use the > Azure ML: Remove Compute command in the command palette.

Inference Clusters

For more information, see compute targets for inference.

Manage inference clusters

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Inference clusters node inside your Compute node.
  4. Right-click the compute you want to:
    • View Compute Properties. Displays read-only configuration data about your attached compute.
    • Detach compute. Detaches the compute from your workspace.

Alternatively, use the > Azure ML: View Compute Properties and > Azure ML: Detach Compute commands respectively in the command palette.

Delete inference clusters

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Attached computes node inside your Compute node.
  4. Right-click the compute you want to delete and select Remove Compute.

Alternatively, use the > Azure ML: Remove Compute command in the command palette.

Attached Compute

For more information, see unmanaged compute.

Manage attached compute

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Expand the Attached computes node inside your Compute node.
  4. Right-click the compute you want to:
    • View Compute Properties. Displays read-only configuration data about your attached compute.
    • Detach compute. Detaches the compute from your workspace.

Alternatively, use the > Azure ML: View Compute Properties and > Azure ML: Detach Compute commands respectively in the command palette.

Models

For more information, see train machine learning models.

For more information, see train machine learning models.

Create model

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Right-click the Models node in your workspace and select Create Model.
  4. A specification file appears. Configure the specification file.
  5. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, use the > Azure ML: Create Model command in the command palette.

View model properties

  1. Expand the subscription node that contains your workspace.
  2. Expand the Models node inside your workspace.
  3. Right-click the model whose properties you want to see and select View Model Properties. A file opens in the editor containing your model properties.

Alternatively, use the > Azure ML: View Model Properties command in the command palette.

Download model

  1. Expand the subscription node that contains your workspace.
  2. Expand the Models node inside your workspace.
  3. Right-click the model you want to download and select Download Model File.

Alternatively, use the > Azure ML: Download Model File command in the command palette.

Delete a model

  1. Expand the subscription node that contains your workspace.
  2. Expand the Models node inside your workspace.
  3. Right-click the model you want to delete and select Remove Model.
  4. A prompt appears confirming you want to remove the model. Select Ok.

Alternatively, use the > Azure ML: Remove Model command in the command palette.

Endpoints

For more information, see endpdoints.

For more information, see endpoints.

Create endpoint

  1. Expand the subscription node that contains your workspace.
  2. Expand your workspace node.
  3. Right-click the Models node in your workspace and select Create Endpoint.
  4. Choose your endpoint type.
  5. A specification file appears. Configure the specification file.
  6. Right-click the specification file and select AzureML: Execute YAML.

Alternatively, use the > Azure ML: Create Endpoint command in the command palette.

Delete endpoint

  1. Expand the subscription node that contains your workspace.
  2. Expand the Endpoints node inside your workspace.
  3. Right-click the deployment you want to remove and select Remove Service.
  4. A prompt appears confirming you want to remove the service. Select Ok.

Alternatively, use the > Azure ML: Remove Service command in the command palette.

View service properties

In addition to creating and deleting deployments, you can view and edit settings associated with the deployment.

  1. Expand the subscription node that contains your workspace.
  2. Expand the Endpoints node inside your workspace.
  3. Right-click the deployment you want to manage:
    • To view deployment configuration settings, select View Service Properties.

Alternatively, use the > Azure ML: View Service Properties command in the command palette.

Next steps

Train an image classification model with the VS Code extension.