AmlCompute Class
AzureML Compute resource.
- Inheritance
-
azure.ai.ml.entities._compute.compute.ComputeAmlCompute
Constructor
AmlCompute(*, name: str, description: str | None = None, size: str | None = None, tags: dict | None = None, ssh_public_access_enabled: bool | None = None, ssh_settings: AmlComputeSshSettings | None = None, min_instances: int | None = None, max_instances: int | None = None, network_settings: NetworkSettings | None = None, idle_time_before_scale_down: int | None = None, identity: IdentityConfiguration | None = None, tier: str | None = None, enable_node_public_ip: bool = True, **kwargs)
Parameters
A set of tags. Contains resource tags defined as key/value pairs.
- ssh_settings
- Optional[AmlComputeSshSettings]
SSH settings to access the AzureML compute cluster.
- network_settings
- Optional[NetworkSettings]
Virtual network settings for the AzureML compute cluster.
Node idle time before scaling down. Defaults to None.
- identity
- Optional[IdentityConfiguration]
The identities that are associated with the compute cluster.
Virtual Machine tier. Accepted values include: "Dedicated", "LowPriority". Defaults to None.
State of the public SSH port. Accepted values are:
- False - Indicates that the public SSH port is closed on all nodes of the cluster.
- True - Indicates that the public SSH port is open on all nodes of the cluster.
- None - Indicates that the public SSH port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be None only during cluster creation time. After creation it will be either True or False. Defaults to None.
- enable_node_public_ip
- bool
Enable or disable node public IP address provisioning. Accepted values are:
- True - Indicates that the compute nodes will have public IPs provisioned.
- False - Indicates that the compute nodes will have a private endpoint and no public IPs. Defaults to True.
Examples
Creating an AmlCompute object.
from azure.ai.ml.entities import AmlCompute, IdentityConfiguration, ManagedIdentityConfiguration
aml_compute = AmlCompute(
name="my-aml-compute",
min_instances=0,
max_instances=10,
idle_time_before_scale_down=100,
identity=IdentityConfiguration(
type="UserAssigned",
user_assigned_identities=[
ManagedIdentityConfiguration(
resource_id="/subscriptions/1234567-abcd-ef12-1234-12345/resourcegroups/our_rg_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/our-agent-aks"
)
],
),
)
Methods
dump |
Dump the compute content into a file in yaml format. |
dump
Dump the compute content into a file in yaml format.
dump(dest: str | PathLike | IO, **kwargs) -> None
Parameters
The destination to receive this compute's content. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable.'.
Attributes
base_path
created_on
The compute resource creation timestamp.
Returns
The compute resource creation timestamp.
Return type
creation_context
The creation context of the resource.
Returns
The creation metadata for the resource.
Return type
id
The resource ID.
Returns
The global ID of the resource, an Azure Resource Manager (ARM) ID.
Return type
provisioning_errors
The compute resource provisioning errors.
Returns
The compute resource provisioning errors.
Return type
provisioning_state
The compute resource's provisioning state.
Returns
The compute resource's provisioning state.
Return type
type
Feedback
Submit and view feedback for