Provision Azure Machine Learning Compute (AmlCompute) as a compute target for training. AmlCompute is a managed-compute infrastructure that allows the user to easily create a single or multi-node compute. To create a persistent AmlCompute resource that can be reused across jobs, make sure to specify the vm_size and max_nodes parameters. The compute can then be shared with other users in the workspace and is kept between jobs. If min_nodes = 0, the compute autoscales down to zero nodes when it isn't used, and scales up automatically when a job is submitted.

AmlCompute has default limits, such as the number of cores that can be allocated. For more information, see Manage and request quotas for Azure resources.

create_aml_compute(
  workspace,
  cluster_name,
  vm_size,
  vm_priority = "dedicated",
  min_nodes = 0,
  max_nodes = NULL,
  idle_seconds_before_scaledown = NULL,
  admin_username = NULL,
  admin_user_password = NULL,
  admin_user_ssh_key = NULL,
  vnet_resourcegroup_name = NULL,
  vnet_name = NULL,
  subnet_name = NULL,
  tags = NULL,
  description = NULL
)

Arguments

workspace

The Workspace object.

cluster_name

A string of the name of the cluster.

vm_size

A string of the size of agent VMs. More details can be found here. Note that not all sizes are available in all regions, as detailed in the aformentioned link. Defaults to 'Standard_NC6'.

vm_priority

A string of either 'dedicated' or 'lowpriority' to use either dedicated or low-priority VMs. Defaults to 'dedicated'.

min_nodes

An integer of the minimum number of nodes to use on the cluster. If not specified, will default to 0.

max_nodes

An integer of the maximum number of nodes to use on the cluster.

idle_seconds_before_scaledown

An integer of the node idle time in seconds before scaling down the cluster. Defaults to 120.

admin_username

A string of the name of the administrator user account that can be used to SSH into nodes.

admin_user_password

A string of the password of the administrator user account.

admin_user_ssh_key

A string of the SSH public key of the administrator user account.

vnet_resourcegroup_name

A string of the name of the resource group where the virtual network is located.

vnet_name

A string of the name of the virtual network.

subnet_name

A string of the name of the subnet inside the vnet.

tags

A named list of tags for the cluster, e.g. list("tag" = "value").`

description

A string of the description for the cluster.

Value

The AmlCompute object.

Details

For more information on using an Azure Machine Learning Compute resource in a virtual network, see Secure Azure ML experimentation and inference jobs within an Azure Virtual Network.

See also

wait_for_provisioning_completion()

Examples

if (FALSE) { ws <- load_workspace_from_config() compute_target <- create_aml_compute(ws, cluster_name = 'mycluster', vm_size = 'STANDARD_D2_V2', max_nodes = 1) wait_for_provisioning_completion(compute_target, show_output = TRUE) }