DsvmCompute Class

Manages a Data Science Virtual Machine compute target in Azure Machine Learning.

The Azure Data Science Virtual Machine (DSVM) is a pre-configured data science and AI development environment in Azure. The VM offers a curated choice of tools and frameworks for full-lifecycle machine learning development. For more information, see Data Science Virtual Machine.

Class ComputeTarget constructor.

Retrieve a cloud representation of a Compute object associated with the provided workspace. Returns an instance of a child class corresponding to the specific type of the retrieved Compute object.

Inheritance
DsvmCompute

Constructor

DsvmCompute(workspace, name)

Parameters

Name Description
workspace
Required

The workspace object containing the DsvmCompute object to retrieve.

name
Required
str

The name of the of the DsvmCompute object to retrieve.

workspace
Required

The workspace object containing the Compute object to retrieve.

name
Required
str

The name of the of the Compute object to retrieve.

Methods

delete

Remove the DsvmCompute object from its associated workspace.

deserialize

Convert a JSON object into a DsvmCompute object.

detach

Detach is not supported for a DsvmCompute object. Use delete instead.

get_credentials

Retrieve the credentials for the DsvmCompute target.

provisioning_configuration

Create a configuration object for provisioning a DsvmCompute target.

refresh_state

Perform an in-place update of the properties of the object.

This method updates the properties based on the current state of the corresponding cloud object. This is primarily used for manual polling of compute state.

serialize

Convert this DsvmCompute object into a JSON serialized dictionary.

delete

Remove the DsvmCompute object from its associated workspace.

delete()

Exceptions

Type Description

Remarks

If this object was created through Azure Machine Learning, the corresponding cloud based objects will also be deleted. If this object was created externally and only attached to the workspace, it will raise exception and nothing will be changed.

deserialize

Convert a JSON object into a DsvmCompute object.

static deserialize(workspace, object_dict)

Parameters

Name Description
workspace
Required

The workspace object the DsvmCompute object is associated with.

object_dict
Required

A JSON object to convert to a DsvmCompute object.

Returns

Type Description

The DsvmCompute representation of the provided JSON object.

Exceptions

Type Description

Remarks

Raises a ComputeTargetException if the provided workspace is not the workspace the Compute is associated with.

detach

Detach is not supported for a DsvmCompute object. Use delete instead.

detach()

Exceptions

Type Description

get_credentials

Retrieve the credentials for the DsvmCompute target.

get_credentials()

Returns

Type Description

The credentials for the DsvmCompute target.

Exceptions

Type Description

provisioning_configuration

Create a configuration object for provisioning a DsvmCompute target.

static provisioning_configuration(vm_size=None, ssh_port=None, location=None)

Parameters

Name Description
vm_size
str

Specifies the size of the VM to provision. More details can be found here: https://aka.ms/azureml-vm-details. Defaults to Standard_DS3_v2.

default value: None
ssh_port
str

The SSH port to open on the VM.

default value: None
location
str

Location to provision cluster in. If not specified, will default to workspace location. Available regions for different desired VM sizes can be found here: https://azure.microsoft.com/global-infrastructure/services/?regions=all&products=virtual-machines

default value: None

Returns

Type Description

A configuration object to be used when creating a Compute object.

Exceptions

Type Description

refresh_state

Perform an in-place update of the properties of the object.

This method updates the properties based on the current state of the corresponding cloud object. This is primarily used for manual polling of compute state.

refresh_state()

Exceptions

Type Description

serialize

Convert this DsvmCompute object into a JSON serialized dictionary.

serialize()

Returns

Type Description

The JSON representation of this DsvmCompute object.

Exceptions

Type Description