azure.ai.ml.entities package

class azure.ai.ml.entities.AmlCompute(*, name: str, description: Optional[str] = None, size: Optional[str] = None, ssh_public_access_enabled: Optional[bool] = None, ssh_settings: Optional[azure.ai.ml.entities._compute.aml_compute.AmlComputeSshSettings] = None, min_instances: Optional[int] = None, max_instances: Optional[int] = None, network_settings: Optional[azure.ai.ml.entities._compute.compute.NetworkSettings] = None, idle_time_before_scale_down: Optional[int] = None, identity: Optional[azure.ai.ml.entities._compute._identity.IdentityConfiguration] = None, tier: Optional[str] = None, **kwargs)[source]

Aml Compute resource

Parameters
  • name (str) – Name of the compute

  • description (str, optional) – Description of the resource.

  • size (str, optional) – Compute Size, defaults to None.

  • ssh_settings (AmlComputeSshSettings, optional) – SSH settings to access the AzureML compute cluster.

  • network_settings (NetworkSettings, optional) – Virtual network settings for the AzureML compute cluster.

  • idle_time_before_scale_down (int, optional) – Node Idle Time before scaling down amlCompute. Defaults to None.

  • identity (IdentityConfiguration, optional) – The identity configuration, identities that are associated with the compute cluster.

  • tier (str, optional) – Virtual Machine tier. Possible values include: “Dedicated”, “LowPriority”. Defaults to None.

  • min_instances (int, optional) – Minimum number of instances. Defaults to None.

  • max_instances (int, optional) – Maximum number of instances. Defaults to None.

  • ssh_public_access_enabled – State of the public SSH port. Possible 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 default only during cluster creation time, after creation it will be either True or False. Possible values include: True, False, None. Default value: None. :type ssh_public_access_enabled: bool, optional

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the compute content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property created_on

Creation timestamp

Returns

[description]

Return type

Optional[str]

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_errors

Provisioning errors

Returns

[description]

Return type

Optional[str]

property provisioning_state

Provisioning state

Returns

[description]

Return type

Optional[str]

property type

The type of the compute, possible values are [“amlcompute”, “computeinstance”, “virtualmachine”, “kubernetes”]

Returns

The type of the compute

Return type

Optional[str]

class azure.ai.ml.entities.AmlComputeNodeInfo(**kwargs)[source]

Compute node information related to a AmlCompute Variables are only populated by the server, and will be ignored when sending a request.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

property current_job_name
class azure.ai.ml.entities.AmlComputeSshSettings(*, admin_username: str, admin_password: Optional[str] = None, ssh_key_value: Optional[str] = None)[source]

SSH settings to access a AML compute target

[summary]

Parameters
  • admin_username (str) – SSH user name

  • admin_password (str, optional) – SSH user password, defaults to None

  • ssh_key_value (Optional[str], optional) – Specifies the SSH rsa private key as a string. Use “ssh-keygen -t rsa -b 2048” to generate your SSH key pairs. Defaults to None

class azure.ai.ml.entities.Asset(name: Optional[str] = None, version: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, **kwargs)[source]

Base class for asset, can’t be instantiated directly.

Parameters
  • name (str) – Name of the resource.

  • version (str) – Version of the asset.

  • description (str) – Description of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None[source]

Dump the artifact content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property version
class azure.ai.ml.entities.AssignedUserConfiguration(*, user_tenant_id: str, user_object_id: str)[source]

Settings to create a compute on behalf of another user.

[summary]

Parameters
  • user_tenant_id (str) – Tenant ID of the user to assign the compute target to.

  • user_object_id (str) – Object ID of the user to assign the compute target to.

class azure.ai.ml.entities.AzureBlobDatastore(*, name: str, account_name: str, container_name: str, description: Optional[str] = None, tags: Optional[Dict] = None, endpoint: str = 'core.windows.net', protocol: str = 'https', properties: Optional[Dict] = None, credentials: Optional[Union[azure.ai.ml.entities._datastore.credentials.AccountKeyCredentials, azure.ai.ml.entities._datastore.credentials.SasTokenCredentials]] = None, **kwargs)[source]

Azure blob storage that is linked to an Azure ML workspace.

Parameters
  • name (str) – Name of the datastore.

  • account_name (str) – Name of the Azure storage account.

  • container_name (str) – Name of the container.

  • description (str) – Description of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • endpoint (str) – Endpoint to use to connect with the Azure storage account.

  • protocol (str) – Protocol to use to connect with the Azure storage account.

  • properties (dict[str, str]) – The asset property dictionary.

  • credentials (Union[AccountKeySection, SasSection]) – Credentials to use for Azure ML workspace to connect to the storage.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the datastore content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property type
class azure.ai.ml.entities.AzureDataLakeGen1Datastore(*, name: str, store_name: str, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, credentials: Optional[Union[azure.ai.ml.entities._datastore.credentials.ServicePrincipalCredentials, azure.ai.ml.entities._datastore.credentials.CertificateCredentials]] = None, **kwargs)[source]

Azure Data Lake aka Gen 1 datastore that is linked to an Azure ML workspace

Parameters
  • name (str) – Name of the datastore.

  • store_name (str) – Name of the Azure storage resource.

  • description (str) – Description of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • credentials (Union[ServicePrincipalSection, CertificateSection]) – Credentials to use for Azure ML workspace to connect to the storage.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the datastore content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property type
class azure.ai.ml.entities.AzureDataLakeGen2Datastore(*, name: str, account_name: str, filesystem: str, description: Optional[str] = None, tags: Optional[Dict] = None, endpoint: str = 'core.windows.net', protocol: str = 'https', properties: Optional[Dict] = None, credentials: Optional[Union[azure.ai.ml.entities._datastore.credentials.ServicePrincipalCredentials, azure.ai.ml.entities._datastore.credentials.CertificateCredentials]] = None, **kwargs)[source]

Azure data lake gen 2 that is linked to an Azure ML workspace.

Parameters
  • name (str) – Name of the datastore.

  • account_name (str) – Name of the Azure storage account.

  • filesystem (str) – The name of the Data Lake Gen2 filesystem.

  • description (str) – Description of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • endpoint (str) – Endpoint to use to connect with the Azure storage account

  • protocol (str) – Protocol to use to connect with the Azure storage account

  • credentials (Union[ServicePrincipalSection, CertificateSection]) – Credentials to use for Azure ML workspace to connect to the storage.

  • properties (dict[str, str]) – The asset property dictionary.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the datastore content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property type
class azure.ai.ml.entities.AzureFileDatastore(*, name: str, account_name: str, file_share_name: str, description: Optional[str] = None, tags: Optional[Dict] = None, endpoint: str = 'core.windows.net', protocol: str = 'https', properties: Optional[Dict] = None, credentials: Union[azure.ai.ml.entities._datastore.credentials.AccountKeyCredentials, azure.ai.ml.entities._datastore.credentials.SasTokenCredentials], **kwargs)[source]

Azure file share that is linked to an Azure ML workspace.

Parameters
  • name (str) – Name of the datastore.

  • account_name (str) – Name of the Azure storage account.

  • file_share_name (str) – Name of the file share.

  • description (str) – Description of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • endpoint (str) – Endpoint to use to connect with the Azure storage account

  • protocol (str) – Protocol to use to connect with the Azure storage account

  • properties (dict[str, str]) – The asset property dictionary.

  • credentials (Union[AccountKeySection, SasSection]) – Credentials to use for Azure ML workspace to connect to the storage.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the datastore content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property type
class azure.ai.ml.entities.BatchDeployment(*, name: str, endpoint_name: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, properties: Optional[Dict[str, str]] = None, model: Optional[Union[str, azure.ai.ml.entities._assets._artifacts.model.Model]] = None, code_configuration: Optional[azure.ai.ml.entities._deployment.code_configuration.CodeConfiguration] = None, environment: Optional[Union[str, azure.ai.ml.entities._assets.environment.Environment]] = None, compute: Optional[str] = None, resources: Optional[azure.ai.ml.entities._job.resource_configuration.ResourceConfiguration] = None, output_file_name: Optional[str] = None, output_action: Optional[azure.ai.ml._restclient.v2022_05_01.models._azure_machine_learning_workspaces_enums.BatchOutputAction] = None, error_threshold: Optional[int] = None, retry_settings: Optional[azure.ai.ml.entities._deployment.deployment_settings.BatchRetrySettings] = None, logging_level: Optional[str] = None, mini_batch_size: Optional[int] = None, max_concurrency_per_instance: Optional[int] = None, environment_variables: Optional[Dict[str, str]] = None, code_path: Optional[Union[os.PathLike, str]] = None, scoring_script: Optional[Union[os.PathLike, str]] = None, instance_count: Optional[int] = None, **kwargs)[source]

Batch endpoint deployment entity

Parameters
  • name (str) – the name of the batch deployment

  • description (str, optional) – Description of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • model (Union[str, Model], optional) – Model entity for the endpoint deployment, defaults to None

  • code_configuration (CodeConfiguration, optional) – defaults to None

  • environment (Union[str, Environment], optional) – Environment entity for the endpoint deployment., defaults to None

  • compute (str) – Compute target for batch inference operation.

  • output_action (str or BatchOutputAction) – Indicates how the output will be organized. Possible values include: “summary_only”, “append_row”. Defaults to “append_row”

  • output_file_name (str) – Customized output file name for append_row output action, defaults to “predictions.csv”

  • max_concurrency_per_instance (int) – Indicates maximum number of parallelism per instance, defaults to 1

  • error_threshold (int, optional) – Error threshold, if the error count for the entire input goes above this value, the batch inference will be aborted. Range is [-1, int.MaxValue] -1 value indicates, ignore all failures during batch inference For FileDataset count of file failures For TabularDataset, this is the count of record failures, defaults to -1

  • retry_settings (BatchRetrySettings, optional) – Retry settings for a batch inference operation, defaults to None

  • resources (ResourceConfiguration) – Indicates compute configuration for the job.

  • logging_level (str, optional) – Logging level for batch inference operation, defaults to “info”

  • mini_batch_size (int, optional) – Size of the mini-batch passed to each batch invocation, defaults to 10

  • environment_variables (dict, optional) – Environment variables that will be set in deployment.

  • code_path (Union[str, PathLike], optional) – Folder path to local code assets. Equivalent to code_configuration.code.

  • scoring_script (Union[str, PathLike], optional) – Scoring script name. Equivalent to code_configuration.code.scoring_script.

  • instance_count (int, optional) – Number of instances the interfering will run on. Equivalent to resources.instance_count.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the deployment content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property code_path
property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property instance_count
property scoring_script
property type
class azure.ai.ml.entities.BatchEndpoint(*, name: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, auth_mode: str = 'aad_token', description: Optional[str] = None, location: Optional[str] = None, defaults: Optional[Dict[str, str]] = None, default_deployment_name: Optional[str] = None, scoring_uri: Optional[str] = None, swagger_uri: Optional[str] = None, **kwargs)[source]

Batch endpoint entity.

Parameters
  • name (str) – Name of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • auth_mode (str, optional) – Possible values include: “AMLToken”, “Key”, “AADToken”, defaults to None

  • description (str, optional) – Description of the inference endpoint, defaults to None

  • location (str, optional) – defaults to None

  • defaults (Dict[str, str], optional) – Traffic rules on how the traffic will be routed across deployments, defaults to {}

  • default_deployment_name (str, optional) – Equivalent to defaults.default_deployment, will be ignored if defaults is present.

  • scoring_uri (str, optional) – URI to use to perform a prediction, readonly.

  • swagger_uri (str, optional) – URI to check the swagger definition of the endpoint.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump()Dict[str, Any][source]

Dump the object content into a file.

Parameters

path (Union[PathLike, str]) – Path to a local file as the target.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_state

Endpoint provisioning state, readonly

Returns

Endpoint provisioning state.

Return type

Optional[str]

property scoring_uri

URI to use to perform a prediction, readonly

Returns

The scoring URI

Return type

Optional[str]

property swagger_uri

URI to check the swagger definition of the endpoint.

Returns

The swagger URI

Return type

Optional[str]

class azure.ai.ml.entities.BatchRetrySettings(*, max_retries: Optional[int] = None, timeout: Optional[int] = None)[source]

Retry settings for batch deployment

Parameters
  • max_retries (int, optional) – Number of retries in failure, defaults to 3

  • timeout (int, optional) – Timeout in seconds, defaults to 30

class azure.ai.ml.entities.BuildContext(*, dockerfile_path: Optional[str] = None, path: Optional[Union[os.PathLike, str]] = None)[source]

Docker build context for Environment

Parameters
  • path (Union[str, os.PathLike]) – The local or remote path to the the docker build context directory.

  • dockerfile_path (str) – The path to the dockerfile relative to root of docker build context directory.

class azure.ai.ml.entities.Choice(values: Optional[List[Union[float, str, dict]]] = None, **kwargs)[source]
class azure.ai.ml.entities.CodeConfiguration(code: Optional[str] = None, scoring_script: Optional[str] = None)[source]

CodeConfiguration.

Parameters
  • code (Union[Code, str, None], optional) – Code entity, defaults to None

  • scoring_script (str, optional) – defaults to None

property scoring_script
class azure.ai.ml.entities.CommandComponent(*, name: Optional[str] = None, version: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict] = None, display_name: Optional[str] = None, command: Optional[str] = None, code: Optional[str] = None, environment: Optional[Union[str, azure.ai.ml.entities._assets.environment.Environment]] = None, distribution: Optional[Union[azure.ai.ml.entities._job.distribution.PyTorchDistribution, azure.ai.ml.entities._job.distribution.MpiDistribution, azure.ai.ml.entities._job.distribution.TensorFlowDistribution]] = None, resources: Optional[azure.ai.ml.entities._job.resource_configuration.ResourceConfiguration] = None, inputs: Optional[Dict] = None, outputs: Optional[Dict] = None, instance_count: Optional[int] = None, **kwargs)[source]

Command component version, used to define a command component.

Parameters
  • name (str) – Name of the component.

  • version (str) – Version of the component.

  • description (str) – Description of the component.

  • tags (dict) – Tag dictionary. Tags can be added, removed, and updated.

  • display_name (str) – Display name of the component.

  • command (str) – Command to be executed in component.

  • code (str) – Code file or folder that will be uploaded to the cloud for component execution.

  • environment (Union[Environment, str]) – Environment that component will run in.

  • distribution (Union[dict, PyTorchDistribution, MpiDistribution, TensorFlowDistribution]) – Distribution configuration for distributed training.

  • resources (Union[dict, ResourceConfiguration]) – Compute Resource configuration for the component.

  • inputs (dict) – Inputs of the component.

  • outputs (dict) – Outputs of the component.

  • instance_count (int) – promoted property from resources.instance_count

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the component content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

load(obj: Any)None
property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property display_name

Display name of the component.

Returns

Display name of the component.

Return type

str

property distribution
property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property inputs

Inputs of the component.

Returns

Inputs of the component.

Return type

dict

property instance_count

Return value of promoted property resources.instance_count.

Returns

Value of resources.instance_count.

Return type

Optional[int]

property is_deterministic

Whether the component is deterministic.

Returns

Whether the component is deterministic

Return type

bool

property outputs

Outputs of the component.

Returns

Outputs of the component.

Return type

dict

property resources
property type

Type of the component, default is ‘command’.

Returns

Type of the component.

Return type

str

property version
class azure.ai.ml.entities.CommandJob(*, inputs: Optional[Dict[str, Union[azure.ai.ml.entities._inputs_outputs.Input, str, bool, int, float]]] = None, outputs: Optional[Dict[str, azure.ai.ml.entities._inputs_outputs.Output]] = None, limits: Optional[azure.ai.ml.entities._job.job_limits.CommandJobLimits] = None, identity: Optional[Union[azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.ManagedIdentity, azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.AmlToken, azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.UserIdentity]] = None, **kwargs)[source]

Command job

Parameters

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the job content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

load(obj: Any)None
PYTHON_SDK_TYPE_MAPPING = {<class 'float'>: 'number', <class 'int'>: 'integer', <class 'bool'>: 'boolean', <class 'str'>: 'string'}
property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property distribution
property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property inputs
property log_files

Job output files.

Returns

Dictionary of log names to url.

Return type

Optional[Dict[str, str]]

property outputs
property parameters

MLFlow parameters

Returns

MLFlow parameters logged in job.

Return type

Dict[str, str]

property resources
property status

Status of the job.

Common values returned include “Running”, “Completed”, and “Failed”.

Note

  • NotStarted - This is a temporary state client-side Run objects are in before cloud submission.

  • Starting - The Run has started being processed in the cloud. The caller has a run ID at this point.

  • Provisioning - Returned when on-demand compute is being created for a given job submission.

  • Preparing - The run environment is being prepared:
    • docker image build

    • conda environment setup

  • Queued - The job is queued in the compute target. For example, in BatchAI the job is in queued state

    while waiting for all the requested nodes to be ready.

  • Running - The job started to run in the compute target.

  • Finalizing - User code has completed and the run is in post-processing stages.

  • CancelRequested - Cancellation has been requested for the job.

  • Completed - The run completed successfully. This includes both the user code and run

    post-processing stages.

  • Failed - The run failed. Usually the Error property on a run will provide details as to why.

  • Canceled - Follows a cancellation request and indicates that the run is now successfully cancelled.

  • NotResponding - For runs that have Heartbeats enabled, no heartbeat has been recently sent.

Returns

Status of the job.

Return type

str

property studio_url

Azure ML studio endpoint

Returns

URL to the job detail page.

Return type

Optional[str]

property type

Type of the job, supported are ‘command’ and ‘sweep’.

Returns

Type of the job.

Return type

str

class azure.ai.ml.entities.CommandJobLimits(*, timeout: Optional[int] = None, **kwargs)[source]

Command Job limit class.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters

timeout (int) – The max run duration in seconds, after which the job will be cancelled. Only supports duration with precision as low as Seconds.

Keyword Arguments

timeout (timedelta) – The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

property timeout
class azure.ai.ml.entities.Component(*, name: Optional[str] = None, version: Optional[str] = None, id: Optional[str] = None, type: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, display_name: Optional[str] = None, is_deterministic: bool = True, inputs: Optional[Dict] = None, outputs: Optional[Dict] = None, yaml_str: Optional[str] = None, _schema: Optional[str] = None, creation_context: Optional[azure.ai.ml._restclient.v2022_05_01.models._models_py3.SystemData] = None, **kwargs)[source]

Base class for component version, used to define a component. Can’t be instantiated directly.

Parameters
  • name (str) – Name of the resource.

  • version (str) – Version of the resource.

  • id (str) – Global id of the resource, Azure Resource Manager ID.

  • type (str) – Type of the command, supported is ‘command’.

  • description (str) – Description of the resource.

  • tags (dict) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict) – Internal use only.

  • display_name (str) – Display name of the component.

  • is_deterministic (bool) – Whether the component is deterministic.

  • inputs (dict) – Inputs of the component.

  • outputs (dict) – Outputs of the component.

  • yaml_str (str) – The yaml string of the component.

  • _schema (str) – Schema of the component.

  • creation_context (SystemData) – Creation metadata of the component.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None[source]

Dump the component content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property display_name

Display name of the component.

Returns

Display name of the component.

Return type

str

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property inputs

Inputs of the component.

Returns

Inputs of the component.

Return type

dict

property is_deterministic

Whether the component is deterministic.

Returns

Whether the component is deterministic

Return type

bool

property outputs

Outputs of the component.

Returns

Outputs of the component.

Return type

dict

property type

Type of the component, default is ‘command’.

Returns

Type of the component.

Return type

str

property version
class azure.ai.ml.entities.Compute(name: str, location: Optional[str] = None, description: Optional[str] = None, resource_id: Optional[str] = None, **kwargs)[source]

Compute resource

Parameters
  • type (str) – The type of the compute, possible values are [“amlcompute”, “computeinstance”, “virtualmachine”, “kubernetes”]

  • name (str) – Name of the compute

  • location (Optional[str], optional) – The resource location, defaults to None

  • description (Optional[str], optional) – Description of the resource.

  • resource_id (str, optional) – ARM resource id of the underlying compute.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None[source]

Dump the compute content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property created_on

Creation timestamp

Returns

[description]

Return type

Optional[str]

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_errors

Provisioning errors

Returns

[description]

Return type

Optional[str]

property provisioning_state

Provisioning state

Returns

[description]

Return type

Optional[str]

property type

The type of the compute, possible values are [“amlcompute”, “computeinstance”, “virtualmachine”, “kubernetes”]

Returns

The type of the compute

Return type

Optional[str]

class azure.ai.ml.entities.ComputeConfiguration(target: Optional[str] = None, instance_count: Optional[int] = None, is_local: Optional[bool] = None, instance_type: Optional[str] = None, location: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, deserialize_properties: bool = False)[source]
get(key: Any, default: Optional[Any] = None)Any
has_key(k: Any)bool
items()list
keys()list
update(*args: Any, **kwargs: Any)None
values()list
class azure.ai.ml.entities.ComputeInstance(*, name: str, description: Optional[str] = None, size: Optional[str] = None, ssh_public_access_enabled: Optional[bool] = None, create_on_behalf_of: Optional[azure.ai.ml.entities._compute.compute_instance.AssignedUserConfiguration] = None, network_settings: Optional[azure.ai.ml.entities._compute.compute.NetworkSettings] = None, ssh_settings: Optional[azure.ai.ml.entities._compute.compute_instance.ComputeInstanceSshSettings] = None, schedules: Optional[azure.ai.ml.entities._compute._schedule.ComputeSchedules] = None, **kwargs)[source]

Compute Instance resource

Parameters
  • name (str) – Name of the compute

  • location (Optional[str], optional) – The resource location, defaults to None

  • description (Optional[str], optional) – Description of the resource.

  • size (Optional[str], optional) – Compute Size, defaults to None

  • create_on_behalf_of (Optional[AssignedUserConfiguration], optional) – defaults to None

  • network_settings (Optional[NetworkSettings], optional) – defaults to None

  • ssh_settings (Optional[ComputeInstanceSshSettings], optional) – defaults to None

  • ssh_public_access_enabled (Optional[bool], optional) – State of the public SSH port. Possible values are: [“False”, “True”, “None”] 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 default only during cluster creation time, after creation it will be either True or False. Possible values include: True, False, None. Default value: None.

  • schedules (Optional[ComputeSchedules], optional) – Compute instance schedules, defaults to None

Variables
  • state – defaults to None

  • last_operation – defaults to None

  • applications – defaults to None

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the compute content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property created_on

Creation timestamp

Returns

[description]

Return type

Optional[str]

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property last_operation

The last operation.

return: The last operation. rtype: str

property provisioning_errors

Provisioning errors

Returns

[description]

Return type

Optional[str]

property provisioning_state

Provisioning state

Returns

[description]

Return type

Optional[str]

property services

The services for the compute instance. rtype: List[Dict[str, str]]

Type

return

property state

The state of the compute

return: The state of the compute. rtype: str

property type

The type of the compute, possible values are [“amlcompute”, “computeinstance”, “virtualmachine”, “kubernetes”]

Returns

The type of the compute

Return type

Optional[str]

class azure.ai.ml.entities.ComputeInstanceSshSettings(*, ssh_key_value: str, **kwargs)[source]

Credentials for an administrator user account to SSH into the compute node. Can only be configured if ssh_public_access_enabled is set to true.

[summary]

Parameters

ssh_key_value (str) – The SSH public key of the administrator user account.

property admin_username

The name of the administrator user account which can be used to SSH into nodes.

return: The name of the administrator user account. rtype: str

property ssh_port

SSH port.

return: SSH port. rtype: str

class azure.ai.ml.entities.ComputePowerAction(value)[source]

The compute power action.

START = 'Start'
STOP = 'Stop'
class azure.ai.ml.entities.ComputeSchedules(*, compute_start_stop: List[azure.ai.ml.entities._compute._schedule.ComputeStartStopSchedule] = None, **kwargs)[source]

Note

This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.

Compute schedules

Parameters
  • compute_start_stop (List[ComputeStartStopSchedule]) – Compute start or stop schedules.

  • kwargs (dict) – A dictionary of additional configuration parameters.

class azure.ai.ml.entities.ComputeStartStopSchedule(*, trigger: Optional[azure.ai.ml.entities._compute._schedule.BaseTrigger] = None, action: Optional[azure.ai.ml._restclient.v2022_01_01_preview.models._azure_machine_learning_workspaces_enums.ComputePowerAction] = None, state: azure.ai.ml._restclient.v2022_01_01_preview.models._azure_machine_learning_workspaces_enums.ScheduleStatus = <ScheduleStatus.ENABLED: 'Enabled'>, **kwargs)[source]

Schedules for compute start or stop scenario

Parameters
  • trigger (Trigger) – The trigger of the schedule.

  • action (ComputePowerAction) – The compute power action.

  • state (ScheduleState) – The state of the schedule.

  • kwargs (dict) – A dictionary of additional configuration parameters.

property provisioning_state

Schedule provisioning state, readonly

Returns

Schedule provisioning state.

Return type

Optional[str]

property schedule_id

Schedule id, readonly

Returns

Schedule id.

Return type

Optional[str]

class azure.ai.ml.entities.CronSchedule(*, expression: str, status: Optional[str] = None, start_time: Optional[str] = None, time_zone: azure.ai.ml.constants.TimeZone = <TimeZone.UTC: 'UTC'>)[source]

Cron schedule

Parameters
  • status (str) – Specifies the schedule’s status. Possible values include: “enabled”, “disabled”.

  • start_time (Union[str, datetime]) – Specifies start time of schedule in ISO 8601 format. If no time zone offset is specified in the start_time, it will default to UTC (+0:00)

  • time_zone (Optional[TimeZone]) – Time zone in which the schedule runs. This does not apply to the start_time.

  • expression (str) – Specifies cron expression of schedule. The expression should follow NCronTab format.

Keyword Arguments
  • end_time (datetime) – Specifies end time of schedule in ISO 8601 format. If not present, the schedule will run indefinitely.

  • schedule_status (str or ScheduleStatus) – Specifies the schedule’s status. Possible values include: “Enabled”, “Disabled”.

  • start_time (datetime) – Specifies start time of schedule in ISO 8601 format.

  • time_zone (str) – Specifies time zone in which the schedule runs. TimeZone should follow Windows time zone format.

  • expression (str) – Required. [Required] Specifies cron expression of schedule. The expression should follow NCronTab format.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

status

A data descriptor that transforms value from snake_case to CamelCase in setter, CamelCase to snake_case in getter. When the optional private_name is provided, the descriptor will set the private_name in the object’s __dict__.

type

A data descriptor that transforms value from snake_case to CamelCase in setter, CamelCase to snake_case in getter. When the optional private_name is provided, the descriptor will set the private_name in the object’s __dict__.

class azure.ai.ml.entities.CronTrigger(*, start_time: Optional[str] = None, time_zone: Optional[str] = None, expression: Optional[str] = None, **kwargs)[source]

Cron trigger

Parameters
  • start_time (str) – The start time.

  • time_zone (str) – The time zone.

  • expression (str) – The cron expression.

  • kwargs (dict) – A dictionary of additional configuration parameters.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

property type

Type of the schedule trigger.

Returns

Type of the schedule trigger.

Return type

str

class azure.ai.ml.entities.CustomerManagedKey(key_vault: Optional[str] = None, key_uri: Optional[str] = None, cosmosdb_id: Optional[str] = None, storage_id: Optional[str] = None, search_id: Optional[str] = None)[source]
class azure.ai.ml.entities.Data(*, name: Optional[str] = None, version: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, path: Optional[str] = None, type: str = 'uri_folder', **kwargs)[source]

Data for training and scoring.

Parameters
  • name (str) – Name of the resource.

  • version (str) – Version of the resource.

  • description (str) – Description of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • path (str) – The path to the asset on the datastore. This can be local or remote

  • type (Literal[AssetTypes.URI_FILE, AssetTypes.URI_FOLDER, AssetTypes.MLTABLE]) – The type of the asset. Valid values are uri_file, uri_folder, mltable. Defaults to uri_folder.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the artifact content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property path
property version
class azure.ai.ml.entities.Datastore(credentials: Any, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, **kwargs)[source]

Datastore of an Azure ML workspace, abstract class.

Parameters
  • name (str) – Name of the datastore.

  • description (str) – Description of the resource.

  • credentials (Union[ServicePrincipalSection, CertificateSection]) – Credentials to use for Azure ML workspace to connect to the storage.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None[source]

Dump the datastore content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property type
class azure.ai.ml.entities.DefaultScaleSettings(**kwargs)[source]

Default scale settings

class azure.ai.ml.entities.Endpoint(base_path: Optional[str] = None, auth_mode: Optional[str] = None, location: Optional[str] = None, name: Optional[str] = None, tags: Optional[Dict[str, str]] = None, properties: Optional[Dict[str, Any]] = None, description: Optional[str] = None, **kwargs)[source]

Endpoint base class.

Parameters
  • auth_mode (str, optional) – the authentication mode, defaults to None

  • location (str, optional) – defaults to None

  • traffic (Dict[str, int], optional) – Traffic rules on how the traffic will be routed across deployments, defaults to {}

  • name (str, optional) – Name of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • scoring_uri (str, optional) – str, Endpoint URI, readonly

  • swagger_uri (str, optional) – str, Endpoint Swagger URI, readonly

  • provisioning_state (str, optional) – str, provisioning state, readonly

  • description (str, optional) – Description of the resource.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

abstract dump(path: Union[os.PathLike, str])None[source]

Dump the object content into a file.

Parameters

path (Union[PathLike, str]) – Path to a local file as the target.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_state

Endpoint provisioning state, readonly

Returns

Endpoint provisioning state.

Return type

Optional[str]

property scoring_uri

URI to use to perform a prediction, readonly

Returns

The scoring URI

Return type

Optional[str]

property swagger_uri

URI to check the swagger definition of the endpoint.

Returns

The swagger URI

Return type

Optional[str]

class azure.ai.ml.entities.EndpointConnection(subscription_id: str, resource_group: str, vnet_name: str, subnet_name: str, location: Optional[str] = None)[source]
class azure.ai.ml.entities.Environment(*, name: Optional[str] = None, version: Optional[str] = None, description: Optional[str] = None, image: Optional[str] = None, build: Optional[azure.ai.ml.entities._assets.environment.BuildContext] = None, conda_file: Optional[Union[os.PathLike, str]] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, **kwargs)[source]

Environment for training.

Parameters
  • name (str) – Name of the resource.

  • version (str) – Version of the asset.

  • description (str) – Description of the resource.

  • image (str) – URI of a custom base image.

  • build (BuildContext) – Docker build context to create the environment. Mutually exclusive with “image”

  • conda_file (Optional[str, os.Pathlike]) – Path to configuration file listing conda packages to install.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the artifact content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

validate()[source]
property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property conda_file

Conda environment specification.

Returns

Conda dependencies loaded from conda_file param.

Return type

Dict

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property version
class azure.ai.ml.entities.IdentityConfiguration(**kwargs)[source]

Managed identity specification

Managed identity specification

Parameters
  • type (str, optional) – Managed identity type, defaults to None

  • user_assigned_identities (list, optional) – List of UserAssignedIdentity objects.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

property type
property user_assigned_identities
class azure.ai.ml.entities.InputPort(*, type_string: str, default: Optional[str] = None, optional: Optional[bool] = False)[source]
class azure.ai.ml.entities.Job(name: Optional[str] = None, display_name: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, experiment_name: Optional[str] = None, compute: Optional[str] = None, services: Optional[Dict[str, azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.JobService]] = None, **kwargs)[source]

Base class for job, can’t be instantiated directly.

Parameters
  • name (str) – Name of the resource.

  • display_name (str) – Display name of the resource.

  • description (str) – Description of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The job property dictionary.

  • experiment_name (str) – Name of the experiment the job will be created under, if None is provided, experiment will be set to current directory.

  • services (dict[str, JobService]) – Information on services associated with the job.

  • compute (str) – Information on compute resources associated with the job.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None[source]

Dump the job content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

PYTHON_SDK_TYPE_MAPPING = {<class 'float'>: 'number', <class 'int'>: 'integer', <class 'bool'>: 'boolean', <class 'str'>: 'string'}
property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property log_files

Job output files.

Returns

Dictionary of log names to url.

Return type

Optional[Dict[str, str]]

property status

Status of the job.

Common values returned include “Running”, “Completed”, and “Failed”.

Note

  • NotStarted - This is a temporary state client-side Run objects are in before cloud submission.

  • Starting - The Run has started being processed in the cloud. The caller has a run ID at this point.

  • Provisioning - Returned when on-demand compute is being created for a given job submission.

  • Preparing - The run environment is being prepared:
    • docker image build

    • conda environment setup

  • Queued - The job is queued in the compute target. For example, in BatchAI the job is in queued state

    while waiting for all the requested nodes to be ready.

  • Running - The job started to run in the compute target.

  • Finalizing - User code has completed and the run is in post-processing stages.

  • CancelRequested - Cancellation has been requested for the job.

  • Completed - The run completed successfully. This includes both the user code and run

    post-processing stages.

  • Failed - The run failed. Usually the Error property on a run will provide details as to why.

  • Canceled - Follows a cancellation request and indicates that the run is now successfully cancelled.

  • NotResponding - For runs that have Heartbeats enabled, no heartbeat has been recently sent.

Returns

Status of the job.

Return type

str

property studio_url

Azure ML studio endpoint

Returns

URL to the job detail page.

Return type

Optional[str]

property type

Type of the job, supported are ‘command’ and ‘sweep’.

Returns

Type of the job.

Return type

str

class azure.ai.ml.entities.KubernetesCompute(*, namespace: Optional[str] = 'default', properties: Optional[Dict[str, Any]] = None, identity: Optional[azure.ai.ml.entities._compute._identity.IdentityConfiguration] = None, **kwargs)[source]

Kubernetes Compute resource

Parameters
  • name (str) – Name of the compute

  • location (Optional[str], optional) – The resource location, defaults to None

  • description (Optional[str], optional) – Description of the resource.

  • resource_id (Optional[str], optional) – ARM resource id of the underlying compute, defaults to None

  • created_on (Optional[str], optional) – defaults to None

  • provisioning_state (Optional[str], optional) – defaults to None

  • namespace (Optional[str], optional) – Namespace of the KubernetesCompute

  • properties (Optional[Dict], optional) – KubernetesProperties, defaults to None

  • identity (IdentityConfiguration, optional) – The identity configuration, identities that are associated with the compute cluster.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the compute content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property created_on

Creation timestamp

Returns

[description]

Return type

Optional[str]

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_errors

Provisioning errors

Returns

[description]

Return type

Optional[str]

property provisioning_state

Provisioning state

Returns

[description]

Return type

Optional[str]

property type

The type of the compute, possible values are [“amlcompute”, “computeinstance”, “virtualmachine”, “kubernetes”]

Returns

The type of the compute

Return type

Optional[str]

class azure.ai.ml.entities.KubernetesOnlineDeployment(*, name: str, endpoint_name: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, properties: Optional[Dict[str, Any]] = None, description: Optional[str] = None, model: Optional[Union[str, azure.ai.ml.entities._assets._artifacts.model.Model]] = None, code_configuration: Optional[azure.ai.ml.entities._deployment.code_configuration.CodeConfiguration] = None, environment: Optional[Union[str, azure.ai.ml.entities._assets.environment.Environment]] = None, app_insights_enabled: bool = False, scale_settings: Optional[azure.ai.ml.entities._deployment.scale_settings.OnlineScaleSettings] = None, request_settings: Optional[azure.ai.ml.entities._deployment.deployment_settings.OnlineRequestSettings] = None, liveness_probe: Optional[azure.ai.ml.entities._deployment.deployment_settings.ProbeSettings] = None, readiness_probe: Optional[azure.ai.ml.entities._deployment.deployment_settings.ProbeSettings] = None, environment_variables: Optional[Dict[str, str]] = None, resources: Optional[azure.ai.ml.entities._deployment.resource_requirements_settings.ResourceRequirementsSettings] = None, instance_count: Optional[int] = None, instance_type: Optional[str] = None, code_path: Optional[Union[os.PathLike, str]] = None, scoring_script: Optional[Union[os.PathLike, str]] = None, **kwargs)[source]

Kubernetes Online endpoint deployment entity

Parameters
  • name (str) – Name of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (Dict[str, Any], optional) – The asset property dictionary.

  • description (str, optional) – Description of the resource.

  • model (Union[str, Model], optional) – Model entity for the endpoint deployment, defaults to None

  • code_configuration (CodeConfiguration, optional) – defaults to None

  • environment (Union[str, Environment], optional) – Environment entity for the endpoint deployment, defaults to None

  • app_insights_enabled (bool, optional) – defaults to False

  • scale_settings (OnlineScaleSettings, optional) – How the online deployment will scale.

  • request_settings (OnlineRequestSettings, optional) – defaults to RequestSettings()

  • liveness_probe (ProbeSettings, optional) – Liveness probe settings.

  • readiness_probe (ProbeSettings, optional) – Readiness probe settings.

  • environment_variables (dict, optional) – Environment variables that will be set in deployment.

  • resources (ResourceRequirementsSettings, optional) – defaults to None

  • instance_type (str) – The instance type defined by K8S cluster admin.

  • instance_count (int) – The instance count used for this deployment.

  • code_path (Union[str, PathLike], optional) – Folder path to local code assets. Equivalent to code_configuration.code.

  • scoring_script (Union[str, PathLike], optional) – Scoring script name. Equivalent to code_configuration.code.scoring_script.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the deployment content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property code_path
property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_state

Deployment provisioning state, readonly

Returns

Deployment provisioning state.

Return type

Optional[str]

property scoring_script
property type
class azure.ai.ml.entities.KubernetesOnlineEndpoint(*, name: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, properties: Optional[Dict[str, Any]] = None, auth_mode: str = 'key', description: Optional[str] = None, location: Optional[str] = None, traffic: Optional[Dict[str, int]] = None, mirror_traffic: Optional[Dict[str, int]] = None, compute: Optional[str] = None, identity: Optional[azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.IdentityConfiguration] = None, kind: Optional[str] = None, **kwargs)[source]

K8s Online endpoint entity

Parameters
  • name (str) – Name of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • auth_mode (str, optional) – Possible values include: “aml_token”, “key”, defaults to “key”

  • description (str, optional) – Description of the inference endpoint, defaults to None

  • location (str, optional) – defaults to None

  • traffic (Dict[str, int], optional) – Traffic rules on how the traffic will be routed across deployments, defaults to {}

  • compute (str, optional) – Compute cluster id.

  • identity (IdentityConfiguration, optional) – defaults to SystemAssigned

  • kind (str, optional) – Kind of the resource, we have two kinds: K8s and Managed online endpoints, defaults to None.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump()Dict[str, Any][source]

Dump the object content into a file.

Parameters

path (Union[PathLike, str]) – Path to a local file as the target.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_state

Endpoint provisioning state, readonly

Returns

Endpoint provisioning state.

Return type

Optional[str]

property scoring_uri

URI to use to perform a prediction, readonly

Returns

The scoring URI

Return type

Optional[str]

property swagger_uri

URI to check the swagger definition of the endpoint.

Returns

The swagger URI

Return type

Optional[str]

class azure.ai.ml.entities.LogNormal(mu: Optional[float] = None, sigma: Optional[float] = None, **kwargs)[source]
class azure.ai.ml.entities.LogUniform(min_value: Optional[float] = None, max_value: Optional[float] = None, **kwargs)[source]
class azure.ai.ml.entities.ManagedOnlineDeployment(*, name: str, endpoint_name: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, properties: Optional[Dict[str, Any]] = None, description: Optional[str] = None, model: Optional[Union[str, azure.ai.ml.entities._assets._artifacts.model.Model]] = None, code_configuration: Optional[azure.ai.ml.entities._deployment.code_configuration.CodeConfiguration] = None, environment: Optional[Union[str, azure.ai.ml.entities._assets.environment.Environment]] = None, app_insights_enabled: bool = False, scale_settings: Optional[azure.ai.ml.entities._deployment.scale_settings.OnlineScaleSettings] = None, request_settings: Optional[azure.ai.ml.entities._deployment.deployment_settings.OnlineRequestSettings] = None, liveness_probe: Optional[azure.ai.ml.entities._deployment.deployment_settings.ProbeSettings] = None, readiness_probe: Optional[azure.ai.ml.entities._deployment.deployment_settings.ProbeSettings] = None, environment_variables: Optional[Dict[str, str]] = None, instance_type: Optional[str] = None, instance_count: Optional[int] = None, code_path: Optional[Union[os.PathLike, str]] = None, scoring_script: Optional[Union[os.PathLike, str]] = None, **kwargs)[source]

Managed Online endpoint deployment entity

Parameters
  • name (str) – Name of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (Dict[str, Any], optional) – The asset property dictionary.

  • description (str, optional) – Description of the resource.

  • model (Union[str, Model], optional) – Model entity for the endpoint deployment, defaults to None

  • code_configuration (CodeConfiguration, optional) – defaults to None

  • environment (Union[str, Environment], optional) – Environment entity for the endpoint deployment, defaults to None

  • app_insights_enabled (bool, optional) – defaults to False

  • scale_settings (OnlineScaleSettings, optional) – How the online deployment will scale.

  • request_settings (OnlineRequestSettings, optional) – defaults to RequestSettings()

  • liveness_probe (ProbeSettings, optional) – Liveness probe settings.

  • readiness_probe (ProbeSettings, optional) – Readiness probe settings.

  • environment_variables (dict, optional) – Environment variables that will be set in deployment.

  • instance_type (str) – Azure compute sku.

  • instance_count (int) – The instance count used for this deployment.

  • code_path (Union[str, PathLike], optional) – Folder path to local code assets. Equivalent to code_configuration.code.

  • scoring_script (Union[str, PathLike], optional) – Scoring script name. Equivalent to code_configuration.code.scoring_script.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the deployment content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property code_path
property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_state

Deployment provisioning state, readonly

Returns

Deployment provisioning state.

Return type

Optional[str]

property scoring_script
property type
class azure.ai.ml.entities.ManagedOnlineEndpoint(*, name: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, properties: Optional[Dict[str, Any]] = None, auth_mode: str = 'key', description: Optional[str] = None, location: Optional[str] = None, traffic: Optional[Dict[str, int]] = None, mirror_traffic: Optional[Dict[str, int]] = None, identity: Optional[azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.IdentityConfiguration] = None, kind: Optional[str] = None, **kwargs)[source]

Managed Online endpoint entity

Parameters
  • name (str) – Name of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • auth_mode (str, optional) – Possible values include: “aml_token”, “key”, defaults to “key”

  • description (str, optional) – Description of the inference endpoint, defaults to None

  • location (str, optional) – defaults to None

  • traffic (Dict[str, int], optional) – Traffic rules on how the traffic will be routed across deployments, defaults to {}

  • identity (IdentityConfiguration, optional) – defaults to SystemAssigned

  • kind (str, optional) – Kind of the resource, we have two kinds: K8s and Managed online endpoints, defaults to None.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump()Dict[str, Any][source]

Dump the object content into a file.

Parameters

path (Union[PathLike, str]) – Path to a local file as the target.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_state

Endpoint provisioning state, readonly

Returns

Endpoint provisioning state.

Return type

Optional[str]

property scoring_uri

URI to use to perform a prediction, readonly

Returns

The scoring URI

Return type

Optional[str]

property swagger_uri

URI to check the swagger definition of the endpoint.

Returns

The swagger URI

Return type

Optional[str]

class azure.ai.ml.entities.Model(*, name: Optional[str] = None, version: Optional[str] = None, type: Optional[str] = None, path: Optional[Union[os.PathLike, str]] = None, utc_time_created: Optional[str] = None, flavors: Optional[Dict[str, Dict[str, Any]]] = None, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, **kwargs)[source]

Model for training and scoring.

Parameters
  • name (str) – Name of the resource.

  • version (str) – Version of the resource.

  • type (str) – The storage format for this entity. Used for NCD. Possible values include: “custom_model”, “mlflow_model”, “triton_model”.

  • utc_time_created (str) – Date and time when the model was created, in UTC ISO 8601 format. (e.g. ‘2020-10-19 17:44:02.096572’)

  • flavors (Dict[str, Any]) – The flavors in which the model can be interpreted. (e.g. {sklearn: {sklearn_version: 0.23.2}, python_function: {loader_module: office.plrmodel, python_version: 3.6})

  • path (str) – A remote uri or a local path pointing at a model. Example: “azureml://subscriptions/my-sub-id/resourcegroups/my-rg/workspaces/myworkspace/datastores/mydatastore/paths/path_on_datastore/”

  • description (str) – Description of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the artifact content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property path
property version
class azure.ai.ml.entities.NetworkSettings(*, vnet_name: Optional[str] = None, subnet: Optional[str] = None, **kwargs)[source]

Network settings for a compute

Parameters
  • vnet_name (str, optional) – The virtual network name, defaults to None

  • subnet (str, optional) – The subnet name, defaults to None

property private_ip_address

Private IP address of the compute instance.

return: Private IP address. rtype: str

property public_ip_address

Public IP address of the compute instance.

return: Public IP address. rtype: str

class azure.ai.ml.entities.Normal(mu: Optional[float] = None, sigma: Optional[float] = None, **kwargs)[source]
class azure.ai.ml.entities.OnlineDeployment(name: str, endpoint_name: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, properties: Optional[Dict[str, Any]] = None, description: Optional[str] = None, model: Optional[Union[str, azure.ai.ml.entities._assets._artifacts.model.Model]] = None, code_configuration: Optional[azure.ai.ml.entities._deployment.code_configuration.CodeConfiguration] = None, environment: Optional[Union[str, azure.ai.ml.entities._assets.environment.Environment]] = None, app_insights_enabled: bool = False, scale_settings: Optional[azure.ai.ml.entities._deployment.scale_settings.OnlineScaleSettings] = None, request_settings: Optional[azure.ai.ml.entities._deployment.deployment_settings.OnlineRequestSettings] = None, liveness_probe: Optional[azure.ai.ml.entities._deployment.deployment_settings.ProbeSettings] = None, readiness_probe: Optional[azure.ai.ml.entities._deployment.deployment_settings.ProbeSettings] = None, environment_variables: Optional[Dict[str, str]] = None, instance_count: Optional[int] = None, instance_type: Optional[str] = None, model_mount_path: Optional[str] = None, code_path: Optional[Union[os.PathLike, str]] = None, scoring_script: Optional[Union[os.PathLike, str]] = None, **kwargs)[source]

Online endpoint deployment entity

Parameters
  • name (str) – Name of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (Dict[str, Any], optional) – The asset property dictionary.

  • description (str, optional) – Description of the resource.

  • model (Union[str, Model], optional) – Model entity for the endpoint deployment, defaults to None

  • code_configuration (CodeConfiguration, optional) – defaults to None

  • environment (Union[str, Environment], optional) – Environment entity for the endpoint deployment, defaults to None

  • app_insights_enabled (bool, optional) – defaults to False

  • scale_settings (OnlineScaleSettings, optional) – How the online deployment will scale.

  • request_settings (OnlineRequestSettings, optional) – defaults to RequestSettings()

  • liveness_probe (ProbeSettings, optional) – Liveness probe settings.

  • readiness_probe (ProbeSettings, optional) – Readiness probe settings.

  • environment_variables (dict, optional) – Environment variables that will be set in deployment.

  • instance_count (int) – The instance count used for this deployment.

  • instance_type (str) – Azure compute sku.

  • model_mount_path (str) – The path to mount the model in custom container..

  • code_path (Union[str, PathLike], optional) – Equivalent to code_configuration.code, will be ignored if code_configuration is present.

  • scoring_script (Union[str, PathLike], optional) – Equivalent to code_configuration.code.scoring_script, will be ignored if code_configuration is present.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the deployment content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property code_path
property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_state

Deployment provisioning state, readonly

Returns

Deployment provisioning state.

Return type

Optional[str]

property scoring_script
property type
class azure.ai.ml.entities.OnlineEndpoint(name: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, properties: Optional[Dict[str, Any]] = None, auth_mode: str = 'key', description: Optional[str] = None, location: Optional[str] = None, traffic: Optional[Dict[str, int]] = None, mirror_traffic: Optional[Dict[str, int]] = None, identity: Optional[azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.IdentityConfiguration] = None, scoring_uri: Optional[str] = None, swagger_uri: Optional[str] = None, provisioning_state: Optional[str] = None, kind: Optional[str] = None, **kwargs)[source]

Online endpoint entity

Parameters
  • name (str) – Name of the resource.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • properties (dict[str, str]) – The asset property dictionary.

  • auth_mode (str, optional) – Possible values include: “aml_token”, “key”, defaults to “key”

  • description (str, optional) – Description of the inference endpoint, defaults to None

  • location (str, optional) – defaults to None

  • traffic (Dict[str, int], optional) – Traffic rules on how the traffic will be routed across deployments, defaults to {}

  • mirror_traffic (Dict[str, int], optional) – Duplicated life traffic used to train a single deployment, defaults to {}

  • provisioning_state (str, optional) – str, provisioning state, readonly

  • identity (IdentityConfiguration, optional) – defaults to SystemAssigned

  • kind (str, optional) – Kind of the resource, we have two kinds: K8s and Managed online endpoints, defaults to None.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

abstract dump(path: Union[os.PathLike, str])None

Dump the object content into a file.

Parameters

path (Union[PathLike, str]) – Path to a local file as the target.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_state

Endpoint provisioning state, readonly

Returns

Endpoint provisioning state.

Return type

Optional[str]

property scoring_uri

URI to use to perform a prediction, readonly

Returns

The scoring URI

Return type

Optional[str]

property swagger_uri

URI to check the swagger definition of the endpoint.

Returns

The swagger URI

Return type

Optional[str]

class azure.ai.ml.entities.OnlineRequestSettings(max_concurrent_requests_per_instance: Optional[int] = None, request_timeout_ms: Optional[int] = None, max_queue_wait_ms: Optional[int] = None)[source]

Request Settings entity

Parameters
  • request_timeout_ms (int, optional) – defaults to 5000

  • max_concurrent_requests_per_instance (int, optional) – defaults to 1

  • max_queue_wait_ms (int, optional) – defaults to 500

class azure.ai.ml.entities.ParallelComponent(*, name: Optional[str] = None, version: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, display_name: Optional[str] = None, retry_settings: Optional[azure.ai.ml.entities._job.parallel.retry_settings.RetrySettings] = None, logging_level: Optional[str] = None, max_concurrency_per_instance: Optional[int] = None, error_threshold: Optional[int] = None, mini_batch_error_threshold: Optional[int] = None, task: Optional[azure.ai.ml.entities._job.parallel.parallel_task.ParallelTask] = None, mini_batch_size: Optional[str] = None, input_data: Optional[str] = None, resources: Optional[azure.ai.ml.entities._job.resource_configuration.ResourceConfiguration] = None, inputs: Optional[Dict] = None, outputs: Optional[Dict] = None, code: Optional[str] = None, instance_count: Optional[int] = None, **kwargs)[source]

Parallel component version, used to define a parallel component.

Parameters
  • name (str) – Name of the component.

  • version (str) – Version of the component.

  • description (str) – Description of the component.

  • tags (dict) – Tag dictionary. Tags can be added, removed, and updated.

  • display_name (str) – Display name of the component.

  • retry_settings (BatchRetrySettings) – parallel component run failed retry

  • logging_level (str) – A string of the logging level name

  • max_concurrency_per_instance (int) – The max parallellism that each compute instance has.

  • error_threshold (int) – The number of item processing failures should be ignored.

  • mini_batch_error_threshold (int) – The number of mini batch processing failures should be ignored.

  • task (ParallelTask) – The parallel task.

  • mini_batch_size (str) – For FileDataset input, this field is the number of files a user script can process in one run() call. For TabularDataset input, this field is the approximate size of data the user script can process in one run() call. Example values are 1024, 1024KB, 10MB, and 1GB. (optional, default value is 10 files for FileDataset and 1MB for TabularDataset.) This value could be set through PipelineParameter.

  • input_data (str) – The input data.

  • resources (Union[dict, ResourceConfiguration]) – Compute Resource configuration for the component.

  • inputs (dict) – Inputs of the component.

  • outputs (dict) – Outputs of the component.

  • code (str) – promoted property from task.code

  • instance_count (int) – promoted property from resources.instance_count

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the component content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

load(obj: Any)None
property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property code

Return value of promoted property task.code, which is a local or remote path pointing at source code.

Returns

Value of task.code.

Return type

Optional[str]

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property display_name

Display name of the component.

Returns

Display name of the component.

Return type

str

property environment

Return value of promoted property task.environment, indicate the environment that training job will run in.

Returns

Value of task.environment.

Return type

Optional[Environment, str]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property inputs

Inputs of the component.

Returns

Inputs of the component.

Return type

dict

property instance_count

Return value of promoted property resources.instance_count.

Returns

Value of resources.instance_count.

Return type

Optional[int]

property is_deterministic

Whether the component is deterministic.

Returns

Whether the component is deterministic

Return type

bool

property outputs

Outputs of the component.

Returns

Outputs of the component.

Return type

dict

property resources
property retry_settings
property task
property type

Type of the component, default is ‘command’.

Returns

Type of the component.

Return type

str

property version
class azure.ai.ml.entities.ParallelJob(*, inputs: Optional[Dict[str, Union[azure.ai.ml.entities._inputs_outputs.Input, str, bool, int, float]]] = None, outputs: Optional[Dict[str, azure.ai.ml.entities._inputs_outputs.Output]] = None, **kwargs)[source]

Parallel job

Parameters
  • name (str) – Name of the job.

  • version (str) – Version of the job.

  • id (str) – Global id of the resource, Azure Resource Manager ID.

  • type (str) – Type of the job, supported is ‘parallel’.

  • description (str) – Description of the job.

  • tags (dict) – Internal use only.

  • properties (dict) – Internal use only.

  • display_name (str) – Display name of the job.

  • retry_settings (BatchRetrySettings) – parallel job run failed retry

  • logging_level (str) – A string of the logging level name

  • max_concurrency_per_instance (int) – The max parallellism that each compute instance has.

  • error_threshold (int) – The number of item processing failures should be ignored.

  • mini_batch_error_threshold (int) – The number of mini batch processing failures should be ignored.

  • task (ParallelTask) – The parallel task.

  • mini_batch_size (str) – The mini batch size.

  • input_data (str) – The input data.

  • inputs (dict) – Inputs of the job.

  • outputs (dict) – Outputs of the job.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the job content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

load(obj: Any)None
PYTHON_SDK_TYPE_MAPPING = {<class 'float'>: 'number', <class 'int'>: 'integer', <class 'bool'>: 'boolean', <class 'str'>: 'string'}
property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property inputs
property log_files

Job output files.

Returns

Dictionary of log names to url.

Return type

Optional[Dict[str, str]]

property outputs
property resources
property retry_settings
property status

Status of the job.

Common values returned include “Running”, “Completed”, and “Failed”.

Note

  • NotStarted - This is a temporary state client-side Run objects are in before cloud submission.

  • Starting - The Run has started being processed in the cloud. The caller has a run ID at this point.

  • Provisioning - Returned when on-demand compute is being created for a given job submission.

  • Preparing - The run environment is being prepared:
    • docker image build

    • conda environment setup

  • Queued - The job is queued in the compute target. For example, in BatchAI the job is in queued state

    while waiting for all the requested nodes to be ready.

  • Running - The job started to run in the compute target.

  • Finalizing - User code has completed and the run is in post-processing stages.

  • CancelRequested - Cancellation has been requested for the job.

  • Completed - The run completed successfully. This includes both the user code and run

    post-processing stages.

  • Failed - The run failed. Usually the Error property on a run will provide details as to why.

  • Canceled - Follows a cancellation request and indicates that the run is now successfully cancelled.

  • NotResponding - For runs that have Heartbeats enabled, no heartbeat has been recently sent.

Returns

Status of the job.

Return type

str

property studio_url

Azure ML studio endpoint

Returns

URL to the job detail page.

Return type

Optional[str]

property task
property type

Type of the job, supported are ‘command’ and ‘sweep’.

Returns

Type of the job.

Return type

str

class azure.ai.ml.entities.ParallelTask(*, type: Optional[str] = None, code: Optional[str] = None, entry_script: Optional[str] = None, args: Optional[str] = None, model: Optional[str] = None, append_row_to: Optional[str] = None, environment: Optional[Union[str, azure.ai.ml.entities._assets.environment.Environment]] = None, **kwargs)[source]

Parallel task.

Parameters
  • type (str) – The type of the parallel task. Possible values are ‘function’and ‘model_config’.

  • code (str) – A local or remote path pointing at source code.

  • entry_script (str) – User script which will be run in parallel on multiple nodes. This is specified as a local file path. The entry_script should contain two functions: init(): this function should be used for any costly or common preparation for subsequent inferences, e.g., deserializing and loading the model into a global object. run(mini_batch): The method to be parallelized. Each invocation will have one mini-batch. ‘mini_batch’: Batch inference will invoke run method and pass either a list or a Pandas DataFrame as an argument to the method. Each entry in min_batch will be a filepath if input is a FileDataset, a Pandas DataFrame if input is a TabularDataset. run() method should return a Pandas DataFrame or an array. For append_row output_action, these returned elements are appended into the common output file. For summary_only, the contents of the elements are ignored. For all output actions, each returned output element indicates one successful inference of input element in the input mini-batch. Each parallel worker process will call init once and then loop over run function until all mini-batches are processed.

  • args (str) – The arguments of the parallel task.

  • model (str) – The model of the parallel task.

  • append_row_to (str) – All values output by run() method invocations will be aggregated into one unique file which is created in the output location. if it is not set, ‘summary_only’ would invoked, which means user script is expected to store the output itself.

  • environment (Union["Environment", str]) – Environment that training job will run in.

classmethod from_dict(dct: dict)[source]

Convert a dict to an Input object.

get(key: Any, default: Optional[Any] = None)Any
has_key(k: Any)bool
items()list
keys()list
classmethod load(path: Optional[Union[os.PathLike, str]] = None, params_override: Optional[list] = None, **kwargs)azure.ai.ml.entities._job.parallel.parallel_task.ParallelTask[source]
classmethod load_from_dict(data: dict, path: Optional[Union[os.PathLike, str]] = None, params_override: Optional[list] = None, **kwargs)azure.ai.ml.entities._job.parallel.parallel_task.ParallelTask[source]
update(*args: Any, **kwargs: Any)None
values()list
class azure.ai.ml.entities.ParameterizedCommand(command: str = '', resources: Optional[Union[dict, azure.ai.ml.entities._job.resource_configuration.ResourceConfiguration]] = None, code: Optional[str] = None, environment_variables: Optional[Dict] = None, distribution: Optional[Union[dict, azure.ai.ml.entities._job.distribution.MpiDistribution, azure.ai.ml.entities._job.distribution.TensorFlowDistribution, azure.ai.ml.entities._job.distribution.PyTorchDistribution]] = None, environment: Optional[Union[str, azure.ai.ml.entities._assets.environment.Environment]] = None, **kwargs)[source]

Command component that contains the traning command and supporting parameters for the command.

Parameters
  • command (str) – Command to be executed in training.

  • code (str) – A local or remote path pointing at source code.

  • distribution (Union[Dict, PyTorchDistribution, MpiDistribution, TensorFlowDistribution]) – Distribution configuration for distributed training.

  • environment (Union[Environment, str]) – Environment that training job will run in.

  • resources (Union[Dict, ResourceConfiguration]) – Compute Resource configuration for the job.

  • kwargs (dict) – A dictionary of additional configuration parameters.

load(obj: Any)None
property distribution
property resources
class azure.ai.ml.entities.ParameterizedParallel(retry_settings: Optional[azure.ai.ml.entities._job.parallel.retry_settings.RetrySettings] = None, logging_level: Optional[str] = None, max_concurrency_per_instance: Optional[int] = None, error_threshold: Optional[int] = None, mini_batch_error_threshold: Optional[int] = None, input_data: Optional[str] = None, task: Optional[azure.ai.ml.entities._job.parallel.parallel_task.ParallelTask] = None, mini_batch_size: Optional[int] = None, resources: Optional[Union[dict, azure.ai.ml.entities._job.resource_configuration.ResourceConfiguration]] = None, environment_variables: Optional[Dict] = None)[source]

Parallel component that contains the traning parallel and supporting parameters for the parallel.

Parameters
  • retry_settings (BatchRetrySettings) – parallel component run failed retry

  • logging_level (str) – A string of the logging level name

  • max_concurrency_per_instance (int) – The max parallellism that each compute instance has.

  • error_threshold (int) – The number of item processing failures should be ignored.

  • mini_batch_error_threshold (int) – The number of mini batch processing failures should be ignored.

  • task (ParallelTask) – The parallel task.

  • mini_batch_size (str) – The mini batch size.

  • input_data (str) – The input data.

  • resources (Union[Dict, ResourceConfiguration]) – Compute Resource configuration for the job.

load(obj: Any)None
property resources
property retry_settings
property task
class azure.ai.ml.entities.PipelineJob(*, component: Optional[azure.ai.ml.entities._component._pipeline_component._PipelineComponent] = None, inputs: Optional[Dict[str, Union[azure.ai.ml.entities._inputs_outputs.Input, str, bool, int, float]]] = None, outputs: Optional[Dict[str, azure.ai.ml.entities._inputs_outputs.Output]] = None, name: Optional[str] = None, description: Optional[str] = None, display_name: Optional[str] = None, experiment_name: Optional[str] = None, jobs: Optional[Dict[str, azure.ai.ml.entities._builders.base_node.BaseNode]] = None, settings: Optional[azure.ai.ml.entities._job.pipeline.pipeline_job_settings.PipelineJobSettings] = None, identity: Optional[Union[azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.ManagedIdentity, azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.AmlToken, azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.UserIdentity]] = None, compute: Optional[str] = None, tags: Optional[Dict[str, str]] = None, schedule: Optional[Union[azure.ai.ml.entities._schedule.schedule.CronSchedule, azure.ai.ml.entities._schedule.schedule.RecurrenceSchedule]] = None, **kwargs)[source]

Pipeline job. Please use @pipeline decorator to create a PipelineJob, not recommended instantiating it directly.

Parameters
  • component (_PipelineComponent) – Pipeline component version. Used to validate given value against

  • inputs (dict[str, Union[Input, str, bool, int, float]]) – Inputs to the pipeline job.

  • outputs (dict[str, Output]) – Outputs the pipeline job.

  • name (str) – Name of the PipelineJob.

  • description (str) – Description of the pipeline job.

  • display_name (str) – Display name of the pipeline job.

  • experiment_name (str) – Name of the experiment the job will be created under, if None is provided, experiment will be set to current directory.

  • jobs (dict[str, BaseNode]) – Pipeline component node name to component object.

  • settings (PipelineJobSettings) – Setting of pipeline job.

  • identity (Union[ManagedIdentity, AmlToken, UserIdentity]) – Identity that training job will use while running on compute.

  • compute (str) – Compute target name of the built pipeline.

  • tags (dict[str, str]) – Tag dictionary. Tags can be added, removed, and updated.

  • schedule (Union[CronSchedule, RecurrenceSchedule]) – Schedule definition of job. If no schedule is provided, the job will run once immediately after it is submitted.

  • kwargs (dict) – A dictionary of additional configuration parameters.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the job content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

PYTHON_SDK_TYPE_MAPPING = {<class 'float'>: 'number', <class 'int'>: 'integer', <class 'bool'>: 'boolean', <class 'str'>: 'string'}
property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property inputs

Inputs of the pipeline job.

Returns

Inputs of the pipeline job.

Return type

dict

property log_files

Job output files.

Returns

Dictionary of log names to url.

Return type

Optional[Dict[str, str]]

property outputs

Outputs of the pipeline job.

Returns

Outputs of the pipeline job.

Return type

dict

property schedule

Schedule of the pipeline job.

Returns

Schedule of the pipeline job.

Return type

Optional[Union[CronSchedule, RecurrenceSchedule]]

property settings

Settings of the pipeline job.

Returns

Settings of the pipeline job.

Return type

PipelineJobSettings

property status

Status of the job.

Common values returned include “Running”, “Completed”, and “Failed”.

Note

  • NotStarted - This is a temporary state client-side Run objects are in before cloud submission.

  • Starting - The Run has started being processed in the cloud. The caller has a run ID at this point.

  • Provisioning - Returned when on-demand compute is being created for a given job submission.

  • Preparing - The run environment is being prepared:
    • docker image build

    • conda environment setup

  • Queued - The job is queued in the compute target. For example, in BatchAI the job is in queued state

    while waiting for all the requested nodes to be ready.

  • Running - The job started to run in the compute target.

  • Finalizing - User code has completed and the run is in post-processing stages.

  • CancelRequested - Cancellation has been requested for the job.

  • Completed - The run completed successfully. This includes both the user code and run

    post-processing stages.

  • Failed - The run failed. Usually the Error property on a run will provide details as to why.

  • Canceled - Follows a cancellation request and indicates that the run is now successfully cancelled.

  • NotResponding - For runs that have Heartbeats enabled, no heartbeat has been recently sent.

Returns

Status of the job.

Return type

str

property studio_url

Azure ML studio endpoint

Returns

URL to the job detail page.

Return type

Optional[str]

property type

Type of the job, supported are ‘command’ and ‘sweep’.

Returns

Type of the job.

Return type

str

class azure.ai.ml.entities.PipelineJobSettings(default_datastore: Optional[str] = None, default_compute: Optional[str] = None, continue_on_step_failure: Optional[bool] = None, force_rerun: Optional[bool] = None, **kwargs)[source]

Settings of PipelineJob, include default_datastore, default_compute, continue_on_step_failure and force_rerun.

Parameters
  • default_datastore (str) – The default datastore of pipeline.

  • default_compute (str) – The default compute target of pipeline.

  • continue_on_step_failure (bool) – Flag when set, continue pipeline execution if a step fails.

  • force_rerun (bool) – Flag will force rerun pipeline execution after set.

class azure.ai.ml.entities.PrivateEndpoint(approval_type: Optional[str] = None, connections: Optional[Dict[str, azure.ai.ml.entities._workspace.private_endpoint.EndpointConnection]] = None)[source]
class azure.ai.ml.entities.ProbeSettings(*, failure_threshold: Optional[int] = None, success_threshold: Optional[int] = None, timeout: Optional[int] = None, period: Optional[int] = None, initial_delay: Optional[int] = None)[source]

Settings on how to probe an endpoint

Parameters
  • failure_threshold (int, optional) – Threshold for probe failures, defaults to 30

  • success_threshold (int, optional) – Threshold for probe success, defaults to 1

  • timeout (int, optional) – timeout in seconds, defaults to 2

  • period (int, optional) – [description], defaults to 10

  • initial_delay (int, optional) – How to to wait for the first probe, defaults to 10

class azure.ai.ml.entities.QLogNormal(mu: Optional[float] = None, sigma: Optional[float] = None, q: Optional[int] = None, **kwargs)[source]
class azure.ai.ml.entities.QLogUniform(min_value: Optional[float] = None, max_value: Optional[float] = None, q: Optional[int] = None, **kwargs)[source]
class azure.ai.ml.entities.QNormal(mu: Optional[float] = None, sigma: Optional[float] = None, q: Optional[int] = None, **kwargs)[source]
class azure.ai.ml.entities.QUniform(min_value: Optional[Union[int, float]] = None, max_value: Optional[Union[int, float]] = None, q: Optional[int] = None, **kwargs)[source]
class azure.ai.ml.entities.Randint(upper: Optional[int] = None, **kwargs)[source]
class azure.ai.ml.entities.RecurrencePattern(*, hours: Union[int, List[int]], minutes: Union[int, List[int]], weekdays: Optional[Union[str, List[str]]] = None)[source]

Recurrence pattern

Parameters
  • hours (Union[int, List[int]]) – List of hours for recurrence schedule pattern.

  • minutes (Union[int, List[int]]) – List of minutes for recurrence schedule pattern.

  • weekdays (Union[str, List[str]]) – List of weekdays for recurrence schedule pattern.

Keyword Arguments
  • hours (list[int]) – Required. [Required] List of hours for recurrence schedule pattern.

  • minutes (list[int]) – Required. [Required] List of minutes for recurrence schedule pattern.

  • weekdays (list[str or Weekday]) – List of weekdays for recurrence schedule pattern.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

hours

A data descriptor that transforms singular literal values to lists in the setter. The getter always returns a list When the optional private_name is provided, the descriptor will set the private_name in the object’s __dict__.

minutes

A data descriptor that transforms singular literal values to lists in the setter. The getter always returns a list When the optional private_name is provided, the descriptor will set the private_name in the object’s __dict__.

weekdays

A data descriptor that transforms singular literal values to lists in the setter. The getter always returns a list When the optional private_name is provided, the descriptor will set the private_name in the object’s __dict__.

class azure.ai.ml.entities.RecurrenceSchedule(*, frequency: str, interval: int, pattern: Optional[azure.ai.ml.entities._schedule.schedule.RecurrencePattern] = None, status: Optional[str] = None, start_time: Optional[str] = None, time_zone: azure.ai.ml.constants.TimeZone = <TimeZone.UTC: 'UTC'>)[source]

Recurrence schedule

Parameters
  • status (str) – Specifies the schedule’s status. Possible values include: “enabled”, “disabled”.

  • start_time (Union[str, datetime]) – Specifies start time of schedule in ISO 8601 format. If no time zone offset is specified in the start_time, it will default to UTC (+0:00)

  • time_zone (Optional[TimeZone]) – Time zone in which the schedule runs. This does not apply to the start_time.

  • frequency (str) – Specifies frequency with with which to trigger schedule. Possible values include: “minute”, “hour”, “day”, “week”, “month”.

  • interval (int) – Specifies schedule interval in conjunction with frequency.

  • pattern (RecurrencePattern) – Specifies the recurrence schedule pattern.

Keyword Arguments
  • end_time (datetime) – Specifies end time of schedule in ISO 8601 format. If not present, the schedule will run indefinitely.

  • schedule_status (str or ScheduleStatus) – Specifies the schedule’s status. Possible values include: “Enabled”, “Disabled”.

  • start_time (datetime) – Specifies start time of schedule in ISO 8601 format.

  • time_zone (str) – Specifies time zone in which the schedule runs. TimeZone should follow Windows time zone format.

  • frequency (str or RecurrenceFrequency) – Required. [Required] Specifies frequency with with which to trigger schedule. Possible values include: “Minute”, “Hour”, “Day”, “Week”, “Month”.

  • interval (int) – Required. [Required] Specifies schedule interval in conjunction with frequency.

  • pattern (RecurrencePattern) – Specifies the recurrence schedule pattern.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

frequency

A data descriptor that transforms value from snake_case to CamelCase in setter, CamelCase to snake_case in getter. When the optional private_name is provided, the descriptor will set the private_name in the object’s __dict__.

status

A data descriptor that transforms value from snake_case to CamelCase in setter, CamelCase to snake_case in getter. When the optional private_name is provided, the descriptor will set the private_name in the object’s __dict__.

type

A data descriptor that transforms value from snake_case to CamelCase in setter, CamelCase to snake_case in getter. When the optional private_name is provided, the descriptor will set the private_name in the object’s __dict__.

class azure.ai.ml.entities.RecurrenceTrigger(*, start_time: Optional[str] = None, time_zone: Optional[str] = None, frequency: Optional[azure.ai.ml._restclient.v2022_01_01_preview.models._azure_machine_learning_workspaces_enums.RecurrenceFrequency] = None, interval: Optional[int] = None, schedule: Optional[azure.ai.ml._restclient.v2022_01_01_preview.models._models_py3.RecurrenceSchedule] = None, **kwargs)[source]

Recurrence trigger

Parameters
  • start_time (str) – The start time.

  • time_zone (str) – The time zone.

  • frequency (RecurrenceFrequency) – Frequency of the recurrence trigger.

  • interval (int) – Recurrence interval.

  • schedule (RecurrenceSchedule) – Schedule of the recurrence trigger.

  • kwargs (dict) – A dictionary of additional configuration parameters.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

property type

Type of the schedule trigger.

Returns

Type of the schedule trigger.

Return type

str

class azure.ai.ml.entities.Resource(name: str, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, **kwargs)[source]

Base class for entity classes, can’t be instantiated directly.

Parameters

ABC (class) – Helper class that provides a standard way to create an ABC using inheritance.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

abstract dump(path: Union[os.PathLike, str])None[source]

Dump the object content into a file.

Parameters

path (Union[PathLike, str]) – Path to a local file as the target.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

class azure.ai.ml.entities.ResourceConfiguration(*, instance_count: Optional[int] = None, instance_type: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]
get(key: Any, default: Optional[Any] = None)Any
has_key(k: Any)bool
items()list
keys()list
update(*args: Any, **kwargs: Any)None
values()list
class azure.ai.ml.entities.ResourceRequirementsSettings(requests: Optional[azure.ai.ml.entities._deployment.container_resource_settings.ResourceSettings] = None, limits: Optional[azure.ai.ml.entities._deployment.container_resource_settings.ResourceSettings] = None)[source]
class azure.ai.ml.entities.ResourceSettings(cpu: Optional[str] = None, memory: Optional[str] = None, gpu: Optional[str] = None)[source]
class azure.ai.ml.entities.RetrySettings(*, timeout: Optional[int] = None, max_retries: Optional[int] = None, **kwargs)[source]

Parallel RetrySettings.

Parameters
  • timeout (int) – Timeout in seconds for each invocation of the run() method. (optional) This value could be set through PipelineParameter.

  • max_retries (int) – The number of maximum tries for a failed or timeout mini batch. The range is [1, int.max]. This value could be set through PipelineParameter. A mini batch with dequeue count greater than this won’t be processed again and will be deleted directly.

classmethod from_dict(dct: dict)[source]

Convert a dict to an Input object.

get(key: Any, default: Optional[Any] = None)Any
has_key(k: Any)bool
items()list
keys()list
classmethod load(path: Optional[Union[os.PathLike, str]] = None, params_override: Optional[list] = None, **kwargs)azure.ai.ml.entities._job.parallel.retry_settings.RetrySettings[source]
classmethod load_from_dict(data: dict, path: Optional[Union[os.PathLike, str]] = None, params_override: Optional[list] = None, **kwargs)azure.ai.ml.entities._job.parallel.retry_settings.RetrySettings[source]
update(*args: Any, **kwargs: Any)None
values()list
azure.ai.ml.entities.ScheduleState

alias of azure.ai.ml._restclient.v2022_01_01_preview.models._azure_machine_learning_workspaces_enums.ScheduleStatus

class azure.ai.ml.entities.ScheduleStatus(value)[source]

Enum to describe status of schedule

DISABLED = 'Disabled'

Schedule is disabled.

ENABLED = 'Enabled'

Schedule is enabled.

class azure.ai.ml.entities.TargetUtilizationScaleSettings(*, min_instances: Optional[int] = None, max_instances: Optional[int] = None, polling_interval: Optional[int] = None, target_utilization_percentage: Optional[int] = None, **kwargs)[source]

Auto scale settings

Parameters
  • min_instances (int, optional) – Minimum number of the instances

  • max_instances (int, optional) – Maximum number of the instances

  • polling_interval (str) – The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds.

  • target_utilization_percentage (int) –

class azure.ai.ml.entities.Uniform(min_value: Optional[float] = None, max_value: Optional[float] = None, **kwargs)[source]
class azure.ai.ml.entities.UnsupportedCompute(**kwargs)[source]

Unsupported compute resource.

Only for use displaying compute properties for resources not fully supported in the SDK.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the compute content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property created_on

Creation timestamp

Returns

[description]

Return type

Optional[str]

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_errors

Provisioning errors

Returns

[description]

Return type

Optional[str]

property provisioning_state

Provisioning state

Returns

[description]

Return type

Optional[str]

property type

The type of the compute, possible values are [“amlcompute”, “computeinstance”, “virtualmachine”, “kubernetes”]

Returns

The type of the compute

Return type

Optional[str]

class azure.ai.ml.entities.Usage(id: Optional[str] = None, aml_workspace_location: Optional[str] = None, type: Optional[str] = None, unit: Optional[Union[str, azure.ai.ml._restclient.v2022_01_01_preview.models._azure_machine_learning_workspaces_enums.UsageUnit]] = None, current_value: Optional[int] = None, limit: Optional[int] = None, name: Optional[azure.ai.ml._restclient.v2022_01_01_preview.models._models_py3.UsageName] = None, **kwargs)[source]

Describes AML Resource Usage

Describes AML Resource Usage :param id: Specifies the resource ID. :type id: str :param aml_workspace_location: Region of the AML workspace in the id. :type aml_workspace_location: str :param type: Specifies the resource type. :type type: str :param unit: An enum describing the unit of usage measurement. Possible values include: “Count”. :type unit: str or ~azure.mgmt.machinelearningservices.models.UsageUnit :param current_value: The current usage of the resource. :type current_value: int :param limit: The maximum permitted usage of the resource. :type limit: int :param name: The name of the type of usage. :type name: ~azure.mgmt.machinelearningservices.models.UsageName

dump(path: Union[os.PathLike, str])None[source]

Dump the resource usage content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

classmethod load(path: Union[os.PathLike, str], params_override: Optional[list] = None, **kwargs)azure.ai.ml.entities._compute._usage.Usage[source]
property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

class azure.ai.ml.entities.UsageName(*, value: Optional[str] = None, localized_value: Optional[str] = None, **kwargs)[source]

The Usage Names.

Parameters
  • value (str) – The name of the resource.

  • localized_value (str) – The localized name of the resource.

class azure.ai.ml.entities.UserAssignedIdentity(resource_id: Optional[str] = None, **kwargs)[source]

User Assigned identity specification

User Assigned identity specification

Parameters
  • resource_id (str) – The resource ID of the user assigned identity.

  • principal_id (str) – The principal ID of the user assigned identity.

  • tenant_id (str) – The tenant ID of the user assigned identity.

  • client_id (str) – The clientId(aka appId) of the user assigned identity.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.ml.entities.VirtualMachineCompute(*, name: str, description: Optional[str] = None, resource_id: str, public_key_data: Optional[str] = None, ssh_settings: Optional[azure.ai.ml.entities._compute.virtual_machine_compute.VirtualMachineSshSettings] = None, **kwargs)[source]

Virtual Machine Compute resource

Parameters
  • name (str) – Name of the compute

  • description (Optional[str], optional) – Description of the resource.

  • resource_id (str) – ARM resource id of the underlying compute

  • ssh_settings (VirtualMachineSshSettings, optional) – SSH settings.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None

Dump the compute content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property created_on

Creation timestamp

Returns

[description]

Return type

Optional[str]

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property provisioning_errors

Provisioning errors

Returns

[description]

Return type

Optional[str]

property provisioning_state

Provisioning state

Returns

[description]

Return type

Optional[str]

property public_key_data

Public key data.

return: Public key data. rtype: str

property type

The type of the compute, possible values are [“amlcompute”, “computeinstance”, “virtualmachine”, “kubernetes”]

Returns

The type of the compute

Return type

Optional[str]

class azure.ai.ml.entities.VirtualMachineSshSettings(*, admin_username: str, admin_password: Optional[str] = None, ssh_port: int = 22, ssh_private_key_file: Optional[str] = None, **kwargs)[source]

SSH settings for a virtual machine

Parameters
  • admin_username (str, required) – Describes the admin user name., defaults to None.

  • admin_password (str, optional) – Describes the admin user password, defaults to None. Required if ssh_private_key_file is not specified.

  • ssh_port (str, optional) – The ssh port number. Default is 22.

  • ssh_private_key_file (str, optional) – Specifies the file containing SSH rsa private key. Use “ssh-keygen -t rsa -b 2048” to generate your SSH key pairs.Required if admin_password is not specified.

class azure.ai.ml.entities.VmSize(name: Optional[str] = None, family: Optional[str] = None, v_cp_us: Optional[int] = None, gpus: Optional[int] = None, os_vhd_size_mb: Optional[int] = None, max_resource_volume_mb: Optional[int] = None, memory_gb: Optional[float] = None, low_priority_capable: Optional[bool] = None, premium_io: Optional[bool] = None, supported_compute_types: Optional[List[str]] = None, **kwargs)[source]

virtual Machine Size

Virtual machine size :param name: The name of the virtual machine size. :type name: str :param family: The family name of the virtual machine size. :type family: str :param v_cp_us: The number of vCPUs supported by the virtual machine size. :type v_cp_us: int :param gpus: The number of gPUs supported by the virtual machine size. :type gpus: int :param os_vhd_size_mb: The OS VHD disk size, in MB, allowed by the virtual machine size. :type os_vhd_size_mb: int :param max_resource_volume_mb: The resource volume size, in MB, allowed by the virtual machine size. :type max_resource_volume_mb: int :param memory_gb: The amount of memory, in GB, supported by the virtual machine size. :type memory_gb: float :param low_priority_capable: Specifies if the virtual machine size supports low priority VMs. :type low_priority_capable: bool :param premium_io: Specifies if the virtual machine size supports premium IO. :type premium_io: bool :param estimated_vm_prices: The estimated price information for using a VM. :type estimated_vm_prices: ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices :param supported_compute_types: Specifies the compute types supported by the virtual machine size. :type supported_compute_types: list[str]

dump(path: Union[os.PathLike, str])None[source]

Dump the virtual machine size content into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

classmethod load(path: Union[os.PathLike, str], params_override: Optional[list] = None, **kwargs)azure.ai.ml.entities._compute._vm_size.VmSize[source]
property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

class azure.ai.ml.entities.Workspace(*, name: str, description: Optional[str] = None, tags: Optional[Dict[str, str]] = None, display_name: Optional[str] = None, location: Optional[str] = None, resource_group: Optional[str] = None, hbi_workspace: bool = False, storage_account: Optional[str] = None, container_registry: Optional[str] = None, key_vault: Optional[str] = None, application_insights: Optional[str] = None, customer_managed_key: Optional[azure.ai.ml.entities._workspace.customer_managed_key.CustomerManagedKey] = None, image_build_compute: Optional[str] = None, public_network_access: Optional[str] = None, softdelete_enable: bool = False, allow_recover_softdeleted_workspace: bool = False, **kwargs)[source]

Azure ML workspace.

Parameters
  • name (str) – Name of the workspace.

  • description (str) – Description of the workspace.

  • tags (dict) – Tags of the workspace.

  • display_name (str) – Display name for the workspace. This is non-unique within the resource group.

  • location (str) – The location to create the workspace in. If not specified, the same location as the resource group will be used.

  • resource_group (str) – Name of resource group to create the workspace in.

  • hbi_workspace (bool) – Whether the customer data is of high business impact (HBI), containing sensitive business information. For more information, see https://docs.microsoft.com/azure/machine-learning/concept-data-encryption#encryption-at-rest.

  • storage_account (str) – The resource ID of an existing storage account to use instead of creating a new one.

  • container_registry (str) – The resource ID of an existing container registry to use instead of creating a new one.

  • key_vault (str) – The resource ID of an existing key vault to use instead of creating a new one.

  • application_insights (str) – The resource ID of an existing application insights to use instead of creating a new one.

  • customer_managed_key (CustomerManagedKey) – Key vault details for encrypting data with customer-managed keys. If not specified, Microsoft-managed keys will be used by default.

  • image_build_compute (str) – The name of the compute target to use for building environment Docker images with the container registry is behind a VNet.

  • public_network_access (str) – Whether to allow public endpoint connectivity when a workspace is private link enabled.

  • softdelete_enable (bool) – Create a workspace with soft delete capability

  • allow_recover_softdeleted_workspace (bool) – Allow an existing soft-deleted workspace to be recovered

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None[source]

Dump the workspace spec into a file in yaml format.

Parameters

path (str) – Path to a local file as the target, new file will be created, raises exception if the file exists.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property discovery_url

Backend service base URLs for the workspace.

Returns

Backend service URLs of the workspace

Return type

str

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property mlflow_tracking_uri

MLflow tracking uri for the workspace.

Returns

Returns mlflow tracking uri of the workspace.

Return type

str

class azure.ai.ml.entities.WorkspaceConnection(*, target: str, type: str, credentials: Union[azure.ai.ml.entities._workspace.connections.credentials.PatTokenCredentials, azure.ai.ml.entities._workspace.connections.credentials.SasTokenCredentials, azure.ai.ml.entities._workspace.connections.credentials.UsernamePasswordCredentials, azure.ai.ml.entities._workspace.connections.credentials.ManagedIdentityCredentials, azure.ai.ml.entities._workspace.connections.credentials.ServicePrincipalCredentials], metadata: Optional[Dict[str, Any]] = None, **kwargs)[source]

Azure ML workspace connection provides a secure way to store authentication and configuration information needed to connect and interact with the external resources.

Parameters
  • name (str) – Name of the workspace connection.

  • target (str) – The URL or ARM resource ID of the external resource.

  • credentials (Union[PatTokenCredentials, SasTokenCredentials, UsernamePasswordCredentials, ManagedIdentityCredentials]) – The credentials for authenticating to the external resource.

  • type (The type of workspace connection, possible values are ["git", "python_feed", "container_registry", "feature_store"]) – The category of external resource for this connection.

Class Resource constructor.

Parameters
  • name (str) – Name of the resource.

  • description (str, optional) – Description of the resource., defaults to None

  • tags (Dict, optional) – Tag dictionary. Tags can be added, removed, and updated., defaults to None

  • properties (Dict, optional) – The asset property dictionary., defaults to None

  • kwargs (dict) – A dictionary of additional configuration parameters.

dump(path: Union[os.PathLike, str])None[source]

Dump the object content into a file.

Parameters

path (Union[PathLike, str]) – Path to a local file as the target.

property base_path

Base path of the resource

Returns

Base path of the resource

Return type

str

property creation_context

Creation context

Returns

Creation metadata of the resource.

Return type

Optional[SystemData]

property credentials

Credentials for workspace connection.

Returns

Credentials for workspace connection.

Return type

WorkspaceConnectionCredentials

property id

Resource ID.

Returns

Global id of the resource, Azure Resource Manager ID

Return type

Optional[str]

property metadata

Metadata for workspace connection.

Returns

Metadata for workspace connection.

Return type

Dict[str, Any]

property target

Target url for the workspace connection.

Returns

Target of the workspace connection.

Return type

str

property type

Type of the workspace connection, supported are ‘Git’, ‘PythonFeed’ and ‘ContainerRegistry’.

Returns

Type of the job.

Return type

str