azure.ai.ml package Azure SDK for Python 2.0.0 documentation

class azure.ai.ml.AmlTokenConfiguration[source]

AzureML Token identity configuration.

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.Input(*, type: typing_extensions.Literal[uri_folder] = "'uri_folder'", path: Optional[str] = 'None', mode: Optional[str] = 'None', optional: Optional[bool] = 'None', description: Optional[str] = 'None', **kwargs)[source] class azure.ai.ml.Input(*, type: typing_extensions.Literal[number] = "'number'", default: Optional[float] = 'None', min: Optional[float] = 'None', max: Optional[float] = 'None', optional: Optional[bool] = 'None', description: Optional[str] = 'None', **kwargs) class azure.ai.ml.Input(*, type: typing_extensions.Literal[integer] = "'integer'", default: Optional[int] = 'None', min: Optional[int] = 'None', max: Optional[int] = 'None', optional: Optional[bool] = 'None', description: Optional[str] = 'None', **kwargs) class azure.ai.ml.Input(*, type: typing_extensions.Literal[string] = "'string'", default: Optional[str] = 'None', optional: Optional[bool] = 'None', description: Optional[str] = 'None', **kwargs) class azure.ai.ml.Input(*, type: typing_extensions.Literal[boolean] = "'boolean'", default: Optional[bool] = 'None', optional: Optional[bool] = 'None', description: Optional[str] = 'None', **kwargs)

Initialize an Input object.

Keyword Arguments
  • type (str) – The type of the data input. Accepted values are ‘uri_folder’, ‘uri_file’, ‘mltable’, ‘mlflow_model’, ‘custom_model’, ‘integer’, ‘number’, ‘string’, and ‘boolean’. Defaults to ‘uri_folder’.

  • path (Optional[str]) – The path to the input data. Paths can be local paths, remote data uris, or a registered AzureML asset ID.

  • mode (Optional[str]) – The access mode of the data input. Accepted values are: * ‘ro_mount’: Mount the data to the compute target as read-only, * ‘download’: Download the data to the compute target, * ‘direct’: Pass in the URI as a string to be accessed at runtime

  • default (Union[str, int, float, bool]) – The default value of the input. If a default is set, the input data will be optional.

  • min (Union[int, float]) – The minimum value for the input. If a value smaller than the minimum is passed to the job, the job execution will fail.

  • max (Union[int, float]) – The maximum value for the input. If a value larger than the maximum is passed to a job, the job execution will fail.

  • optional (Optional[bool]) – Specifies if the input is optional.

  • description (Optional[str]) – Description of the input

  • datastore (str) – The datastore to upload local files to.

  • intellectual_property (IntellectualProperty) – Intellectual property for the input.

Raises

ValidationException – Raised if Input cannot be successfully validated. Details will be provided in the error message.

Base class for Input & Output class.

This class is introduced to support literal output in the future.

Parameters

type (str) – The type of the Input/Output.

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 T

alias of TypeVar(‘T’)

class azure.ai.ml.MLClient(credential: azure.core.credentials.TokenCredential, subscription_id: Optional[str] = None, resource_group_name: Optional[str] = None, workspace_name: Optional[str] = None, registry_name: Optional[str] = None, **kwargs: Any)[source]

A client class to interact with Azure ML services.

Use this client to manage Azure ML resources such as workspaces, jobs, models, and so on.

Parameters
  • credential (TokenCredential) – The credential to use for authentication.

  • subscription_id (Optional[str]) – The Azure subscription ID. Optional for registry assets only. Defaults to None.

  • resource_group_name (Optional[str]) – The Azure resource group. Optional for registry assets only. Defaults to None.

  • workspace_name (Optional[str]) – The workspace to use in the client. Optional only for operations that are not workspace-dependent. Defaults to None.

  • registry_name (Optional[str]) – The registry to use in the client. Optional only for operations that are not workspace-dependent. Defaults to None.

Keyword Arguments
  • show_progress (Optional[bool]) – Specifies whether or not to display progress bars for long-running operations (e.g. customers may consider setting this to False if not using this SDK in an interactive setup). Defaults to True.

  • enable_telemetry (Optional[bool]) – Specifies whether or not to enable telemetry. Will be overridden to False if not in a Jupyter Notebook. Defaults to True if in a Jupyter Notebook.

  • cloud (Optional[str]) – The cloud name to use. Defaults to “AzureCloud”.

Raises
  • ValueError – Raised if credential is None.

  • ValidationException – Raised if both workspace_name and registry_name are provided.

Example:

Creating the MLClient with Azure Identity credentials.
from azure.identity import AzureAuthorityHosts, DefaultAzureCredential from azure.ai.ml import MLClient ml_client = MLClient(subscription_id, resource_group, credential=DefaultAzureCredential()) 
begin_create_or_update(entity: R, **kwargs)azure.core.polling._poller.LROPoller[R][source]

Creates or updates an Azure ML resource asynchronously.

Parameters

entity (typing.Union[Workspace , Registry, Compute, OnlineDeployment , OnlineEndpoint, BatchDeployment , BatchEndpoint, Schedule]) – The resource to create or update.

Returns

The resource after create/update operation.

Return type

azure.core.polling.LROPoller[typing.Union[Workspace , Registry, Compute, OnlineDeployment , OnlineEndpoint, BatchDeployment , BatchEndpoint, Schedule]]

create_or_update(entity: T, **kwargs)T[source]

Creates or updates an Azure ML resource.

Parameters

entity (typing.Union[Job , Model, Environment, Component , Datastore]) – The resource to create or update.

Returns

The created or updated resource.

Return type

typing.Union[Job, Model , Environment, Component, Datastore]

classmethod from_config(credential: azure.core.credentials.TokenCredential, *, path: Optional[Union[os.PathLike, str]] = None, file_name=None, **kwargs)azure.ai.ml._ml_client.MLClient[source]

Returns a client from an existing Azure Machine Learning Workspace using a file configuration.

This method provides a simple way to reuse the same workspace across multiple Python notebooks or projects. Users can save the workspace Azure Resource Manager (ARM) properties using the [workspace.write_config](https://aka.ms/ml-workspace-class) method, and use this method to load the same workspace in different Python notebooks or projects without retyping the workspace ARM properties.

Parameters

credential (TokenCredential) – The credential object for the workspace.

Keyword Arguments
  • path (Optional[Union[os.PathLike, str]]) – The path to the configuration file or starting directory to search for the configuration file within. Defaults to None, indicating the current directory will be used.

  • file_name (Optional[str]) – The configuration file name to search for when path is a directory path. Defaults to “config.json”.

  • cloud (Optional[str]) – The cloud name to use. Defaults to “AzureCloud”.

Raises

ValidationException – Raised if “config.json”, or file_name if overridden, cannot be found in directory. Details will be provided in the error message.

Returns

The client for an existing Azure ML Workspace.

Return type

MLClient

Example:

Creating an MLClient from a file named “config.json” in directory “src”.
from azure.ai.ml import MLClient client = MLClient.from_config(credential=DefaultAzureCredential(), path="src") 
R

alias of TypeVar(‘R’, azure.ai.ml.entities._workspace.workspace.Workspace, azure.ai.ml.entities._registry.registry.Registry, azure.ai.ml.entities._compute.compute.Compute, azure.ai.ml.entities._deployment.online_deployment.OnlineDeployment, azure.ai.ml.entities._endpoint.online_endpoint.OnlineEndpoint, azure.ai.ml.entities._deployment.batch_deployment.BatchDeployment, azure.ai.ml.entities._endpoint.batch_endpoint.BatchEndpoint, azure.ai.ml.entities._schedule.schedule.Schedule)

T

alias of TypeVar(‘T’, azure.ai.ml.entities._job.job.Job, azure.ai.ml.entities._assets._artifacts.model.Model, azure.ai.ml.entities._assets.environment.Environment, azure.ai.ml.entities._component.component.Component, azure.ai.ml.entities._datastore.datastore.Datastore)

property batch_deployments

A collection of batch deployment related operations.

Returns

Batch Deployment operations.

Return type

BatchDeploymentOperations

property batch_endpoints

A collection of batch endpoint related operations.

Returns

Batch Endpoint operations

Return type

BatchEndpointOperations

property components

A collection of component related operations.

Returns

Component operations.

Return type

ComponentOperations

property compute

A collection of compute related operations.

Returns

Compute operations

Return type

ComputeOperations

property connections

A collection of workspace connection related operations.

Returns

Workspace Connections operations

Return type

WorkspaceConnectionsOperations

property data

A collection of data related operations.

Returns

Data operations.

Return type

DataOperations

property datastores

A collection of datastore related operations.

Returns

Datastore operations.

Return type

DatastoreOperations

property environments

A collection of environment related operations.

Returns

Environment operations.

Return type

EnvironmentOperations

property feature_sets

//aka.ms/azuremlexperimental for more information.

A collection of feature set related operations.

Returns

FeatureSet operations

Return type

FeatureSetOperations

Type

Note

This is an experimental method, and may change at any time. Please see https

property feature_store_entities

//aka.ms/azuremlexperimental for more information.

A collection of feature store entity related operations.

Returns

FeatureStoreEntity operations

Return type

FeatureStoreEntityOperations

Type

Note

This is an experimental method, and may change at any time. Please see https

property feature_stores

//aka.ms/azuremlexperimental for more information.

A collection of feature store related operations.

Returns

FeatureStore operations

Return type

FeatureStoreOperations

Type

Note

This is an experimental method, and may change at any time. Please see https

property jobs

A collection of job related operations.

Returns

Job operations

Return type

JobOperations

property models

A collection of model related operations.

Returns

Model operations

Return type

ModelOperations

property online_deployments

A collection of online deployment related operations.

Returns

Online Deployment operations

Return type

OnlineDeploymentOperations

property online_endpoints

A collection of online endpoint related operations.

Returns

Online Endpoint operations

Return type

OnlineEndpointOperations

property registries

//aka.ms/azuremlexperimental for more information.

A collection of registry-related operations.

Returns

Registry operations

Return type

RegistryOperations

Type

Note

This is an experimental method, and may change at any time. Please see https

property resource_group_name

Get the resource group name of an MLClient object.

Returns

An Azure resource group name.

Return type

str

property schedules

A collection of schedule related operations.

Returns

Schedule operations.

Return type

ScheduleOperations

property subscription_id

Get the subscription ID of an MLClient object.

Returns

An Azure subscription ID.

Return type

str

property workspace_hubs

//aka.ms/azuremlexperimental for more information.

A collection of workspace hub-related operations.

Returns

Hub Operations

Return type

HubOperations

Type

Note

This is an experimental method, and may change at any time. Please see https

property workspace_name

The name of the workspace where workspace-dependent operations will be executed.

Returns

The name of the default workspace.

Return type

Optional[str]

property workspaces

A collection of workspace-related operations.

Returns

Workspace operations

Return type

WorkspaceOperations

class azure.ai.ml.ManagedIdentityConfiguration(*, client_id: Optional[str] = None, resource_id: Optional[str] = None, object_id: Optional[str] = None, principal_id: Optional[str] = None)[source]

Managed Identity credential configuration.

Keyword Arguments
  • client_id (Optional[str]) – The client ID of the managed identity.

  • resource_id (Optional[str]) – The resource ID of the managed identity.

  • object_id (Optional[str]) – The object ID.

  • principal_id (Optional[str]) – The principal ID.

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.MpiDistribution(*, process_count_per_instance: Optional[int] = None, **kwargs)[source]

MPI distribution configuration.

Keyword Arguments

process_count_per_instance (Optional[int]) – The number of processes per node.

Variables

type (str) – Specifies the type of distribution. Set automatically to “mpi” for this class.

class azure.ai.ml.Output(type: typing_extensions.Literal[uri_folder] = 'uri_folder', path=None, mode=None, description=None)[source] class azure.ai.ml.Output(type: typing_extensions.Literal[uri_file] = 'uri_file', path=None, mode=None, description=None)

Base class for Input & Output class.

This class is introduced to support literal output in the future.

Parameters

type (str) – The type of the Input/Output.

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.PyTorchDistribution(*, process_count_per_instance: Optional[int] = None, **kwargs)[source]

PyTorch distribution configuration.

Keyword Arguments

process_count_per_instance (Optional[int]) – The number of processes per node.

Variables

type (str) – Specifies the type of distribution. Set automatically to “pytorch” for this class.

class azure.ai.ml.RayDistribution(*, port: Optional[int] = None, address: Optional[str] = None, include_dashboard: Optional[bool] = None, dashboard_port: Optional[int] = None, head_node_additional_args: Optional[str] = None, worker_node_additional_args: Optional[str] = None, **kwargs)[source]

Ray distribution configuration.

Variables
  • port (int) – The port of the head ray process.

  • address (str) – The address of Ray head node.

  • include_dashboard (bool) – Provide this argument to start the Ray dashboard GUI.

  • dashboard_port (int) – The port to bind the dashboard server to.

  • head_node_additional_args (str) – Additional arguments passed to ray start in head node.

  • worker_node_additional_args (str) – Additional arguments passed to ray start in worker node.

  • type (str) – Specifies the type of distribution. Set automatically to “Ray” for this class.

class azure.ai.ml.TensorFlowDistribution(*, parameter_server_count: Optional[int] = 0, worker_count: Optional[int] = None, **kwargs)[source]

TensorFlow distribution configuration.

Keyword Arguments
  • parameter_server_count (Optional[int]) – The number of parameter server tasks. Defaults to 0.

  • worker_count (Optional[int]) – The number of workers. Defaults to the instance count.

Variables
  • parameter_server_count (int) – Number of parameter server tasks.

  • worker_count (int) – Number of workers. If not specified, will default to the instance count.

  • type (str) – Specifies the type of distribution. Set automatically to “tensorflow” for this class.

class azure.ai.ml.UserIdentityConfiguration[source]

User identity configuration.

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 azure.ai.ml.command(*, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, display_name: Optional[str] = None, command: Optional[str] = None, experiment_name: Optional[str] = None, environment: Optional[Union[str, azure.ai.ml.entities._assets.environment.Environment]] = 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, azure.ai.ml.entities._job.distribution.RayDistribution]] = None, compute: Optional[str] = None, inputs: Optional[Dict] = None, outputs: Optional[Dict] = None, instance_count: Optional[int] = None, instance_type: Optional[str] = None, locations: Optional[List[str]] = None, docker_args: Optional[str] = None, shm_size: Optional[str] = None, timeout: Optional[int] = None, code: Optional[Union[os.PathLike, str]] = None, identity: Optional[Union[azure.ai.ml.entities._credentials.ManagedIdentityConfiguration, azure.ai.ml.entities._credentials.AmlTokenConfiguration, azure.ai.ml.entities._credentials.UserIdentityConfiguration]] = None, is_deterministic: bool = True, services: Optional[Dict[str, Union[azure.ai.ml.entities._job.job_service.JobService, azure.ai.ml.entities._job.job_service.JupyterLabJobService, azure.ai.ml.entities._job.job_service.SshJobService, azure.ai.ml.entities._job.job_service.TensorBoardJobService, azure.ai.ml.entities._job.job_service.VsCodeJobService]]] = None, job_tier: Optional[str] = None, priority: Optional[str] = None, **kwargs)azure.ai.ml.entities._builders.command.Command[source]

Creates a Command object which can be used inside a dsl.pipeline function or used as a standalone Command job.

Keyword Arguments
  • name (Optional[str]) – The name of the Command job or component.

  • description (Optional[str]) – The description of the Command. Defaults to None.

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

  • properties (Optional[dict[str, str]]) – The job property dictionary. Defaults to None.

  • display_name (Optional[str]) – The display name of the job. Defaults to a randomly generated name.

  • command (Optional[str]) – The command to be executed. Defaults to None.

  • experiment_name (Optional[str]) – The name of the experiment that the job will be created under. Defaults to current directory name.

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

  • environment_variables (Optional[dict[str, str]]) – A dictionary of environment variable names and values. These environment variables are set on the process where user script is being executed. Defaults to None.

  • distribution (Optional[Union[dict, PyTorchDistribution, MpiDistribution, TensorFlowDistribution, RayDistribution]]) – The configuration for distributed jobs. Defaults to None.

  • compute (Optional[str]) – The compute target the job will run on. Defaults to default compute.

  • inputs (Optional[dict[str, Union[Input, str, bool, int, float, Enum]]]) – A mapping of input names to input data sources used in the job. Defaults to None.

  • outputs (Optional[dict[str, Union[str, Output]]]) – A mapping of output names to output data sources used in the job. Defaults to None.

  • instance_count (Optional[int]) – The number of instances or nodes to be used by the compute target. Defaults to 1.

  • instance_type (Optional[str]) – The type of VM to be used by the compute target.

  • locations (Optional[list[str]]) – The list of locations where the job will run.

  • docker_args (Optional[str]) – Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. Defaults to None.

  • shm_size (Optional[str]) – The size of the Docker container’s shared memory block. This should be in the format of (number)(unit) where the number has to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes).

  • timeout (Optional[int]) – The number, in seconds, after which the job will be cancelled.

  • code (Optional[Union[str, os.PathLike]]) – The source code to run the job. Can be a local path or “http:”, “https:”, or “azureml:” url pointing to a remote location.

  • identity (Optional[Union[ ManagedIdentityConfiguration, AmlTokenConfiguration, UserIdentityConfiguration]]) – The identity that the command job will use while running on compute.

  • is_deterministic (bool) – Specifies whether the Command will return the same output given the same input. Defaults to True. When True, if a Command Component is deterministic and has been run before in the current workspace with the same input and settings, it will reuse results from a previously submitted job when used as a node or step in a pipeline. In that scenario, no compute resources will be used.

  • services (Optional[dict[str, Union[JobService, JupyterLabJobService, SshJobService, TensorBoardJobService, VsCodeJobService]]]) – The interactive services for the node. Defaults to None. This is an experimental parameter, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.

  • job_tier (Optional[str]) – The job tier. Accepted values are “Spot”, “Basic”, “Standard”, or “Premium”.

  • priority (Optional[str]) – The priority of the job on the compute. Accepted values are “low”, “medium”, and “high”. Defaults to “medium”.

Returns

A Command object.

Return type

Command

azure.ai.ml.load_batch_deployment(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._deployment.batch_deployment.BatchDeployment[source]

Construct a batch deployment object from yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of a batch deployment object. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Returns

Constructed batch deployment object.

Return type

BatchDeployment

azure.ai.ml.load_batch_endpoint(source: Union[str, os.PathLike, IO], relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._endpoint.batch_endpoint.BatchEndpoint[source]

Construct a batch endpoint object from yaml file.

Parameters
  • source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of a batch endpoint object. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

Keyword Arguments

params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Returns

Constructed batch endpoint object.

Return type

BatchEndpoint

azure.ai.ml.load_component(source: Optional[Union[str, os.PathLike, IO]] = None, *, relative_origin: Optional[str] = None, **kwargs)Union[azure.ai.ml.entities._component.command_component.CommandComponent, azure.ai.ml.entities._component.parallel_component.ParallelComponent, azure.ai.ml.entities._component.pipeline_component.PipelineComponent][source]

Load component from local or remote to a component function.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of a component. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Returns

A Component object

Return type

Union[CommandComponent, ParallelComponent, PipelineComponent]

azure.ai.ml.load_compute(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._compute.compute.Compute[source]

Construct a compute object from a yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of a compute. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Returns

Loaded compute object.

Return type

Compute

azure.ai.ml.load_data(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._assets._artifacts.data.Data[source]

Construct a data object from yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of a data object. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Raises

ValidationException – Raised if Data cannot be successfully validated. Details will be provided in the error message.

Returns

Constructed Data or DataImport object.

Return type

Data

azure.ai.ml.load_datastore(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._datastore.datastore.Datastore[source]

Construct a datastore object from a yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of a datastore. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Raises

ValidationException – Raised if Datastore cannot be successfully validated. Details will be provided in the error message.

Returns

Loaded datastore object.

Return type

Datastore

azure.ai.ml.load_environment(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._assets.environment.Environment[source]

Construct a environment object from yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of an environment. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Raises

ValidationException – Raised if Environment cannot be successfully validated. Details will be provided in the error message.

Returns

Constructed environment object.

Return type

Environment

azure.ai.ml.load_job(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._job.job.Job[source]

Constructs a Job object from a YAML file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – A path to a local YAML file or an already-open file object containing a job configuration. If the source is a path, it will be opened and read. If the source is an open file, the file will be read directly.

Keyword Arguments
  • relative_origin (Optional[str]) – The root directory for the YAML. This directory will be used as the origin for deducing the relative locations of files referenced in the parsed YAML. Defaults to the same directory as source if source is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (Optional[list[dict]]) – Parameter fields to overwrite values in the YAML file.

Raises

ValidationException – Raised if Job cannot be successfully validated. Details will be provided in the error message.

Returns

A loaded Job object.

Return type

Job

azure.ai.ml.load_model(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._assets._artifacts.model.Model[source]

Constructs a Model object from a YAML file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – A path to a local YAML file or an already-open file object containing a job configuration. If the source is a path, it will be opened and read. If the source is an open file, the file will be read directly.

Keyword Arguments
  • relative_origin (Optional[str]) – The root directory for the YAML. This directory will be used as the origin for deducing the relative locations of files referenced in the parsed YAML. Defaults to the same directory as source if source is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (Optional[list[dict]]) – Parameter fields to overwrite values in the YAML file.

Raises

ValidationException – Raised if Job cannot be successfully validated. Details will be provided in the error message.

Returns

A loaded Model object.

Return type

Model

azure.ai.ml.load_model_package(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._assets._artifacts._package.model_package.ModelPackage[source]

Constructs a ModelPackage object from a YAML file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – A path to a local YAML file or an already-open file object containing a job configuration. If the source is a path, it will be opened and read. If the source is an open file, the file will be read directly.

Keyword Arguments
  • relative_origin (Optional[str]) – The root directory for the YAML. This directory will be used as the origin for deducing the relative locations of files referenced in the parsed YAML. Defaults to the same directory as source if source is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (Optional[list[dict]]) – Parameter fields to overwrite values in the YAML file.

Raises

ValidationException – Raised if Job cannot be successfully validated. Details will be provided in the error message.

Returns

A loaded ModelPackage object.

Return type

ModelPackage

azure.ai.ml.load_online_deployment(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._deployment.online_deployment.OnlineDeployment[source]

Construct a online deployment object from yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of an online deployment object. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Raises

ValidationException – Raised if Online Deployment cannot be successfully validated. Details will be provided in the error message.

Returns

Constructed online deployment object.

Return type

OnlineDeployment

azure.ai.ml.load_online_endpoint(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._endpoint.online_endpoint.OnlineEndpoint[source]

Construct a online endpoint object from yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of an online endpoint object. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Raises

ValidationException – Raised if Online Endpoint cannot be successfully validated. Details will be provided in the error message.

Returns

Constructed online endpoint object.

Return type

OnlineEndpoint

azure.ai.ml.load_registry(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._registry.registry.Registry[source]

Load a registry object from a yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of a registry. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Returns

Loaded registry object.

Return type

Registry

azure.ai.ml.load_workspace(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._workspace.workspace.Workspace[source]

Load a workspace object from a yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of a workspace. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Returns

Loaded workspace object.

Return type

Workspace

azure.ai.ml.load_workspace_connection(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._workspace.connections.workspace_connection.WorkspaceConnection[source]

Construct a workspace connection object from yaml file.

Parameters

source (Union[PathLike, str, io.TextIOWrapper]) – The local yaml source of a workspace connection object. Must be either a path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Returns

Constructed workspace connection object.

Return type

WorkspaceConnection

azure.ai.ml.load_workspace_hub(source: Union[str, os.PathLike, IO], *, relative_origin: Optional[str] = None, **kwargs)azure.ai.ml.entities._workspace_hub.workspace_hub.WorkspaceHub[source]

Load a WorkspaceHub object from a yaml file. :param source: The local yaml source of a WorkspaceHub. Must be either a

path to a local file, or an already-open file. If the source is a path, it will be open and read. An exception is raised if the file does not exist. If the source is an open file, the file will be read directly, and an exception is raised if the file is not readable.

Keyword Arguments
  • relative_origin (str) – The origin to be used when deducing the relative locations of files referenced in the parsed yaml. Defaults to the inputted source’s directory if it is a file or file path input. Defaults to “./” if the source is a stream input with no name value.

  • params_override (List[Dict]) – Fields to overwrite on top of the yaml file. Format is [{“field1”: “value1”}, {“field2”: “value2”}]

Returns

Loaded WorkspaceHub object.

Return type

WorkspaceHub

azure.ai.ml.spark(*, experiment_name: Optional[str] = None, name: Optional[str] = None, display_name: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict] = None, code: Optional[Union[os.PathLike, str]] = None, entry: Optional[Union[Dict[str, str], azure.ai.ml.entities._job.spark_job_entry.SparkJobEntry]] = None, py_files: Optional[List[str]] = None, jars: Optional[List[str]] = None, files: Optional[List[str]] = None, archives: Optional[List[str]] = None, identity: Optional[Union[Dict[str, str], azure.ai.ml._restclient.v2023_04_01_preview.models._models_py3.ManagedIdentity, azure.ai.ml._restclient.v2023_04_01_preview.models._models_py3.AmlToken, azure.ai.ml._restclient.v2023_04_01_preview.models._models_py3.UserIdentity]] = None, driver_cores: Optional[int] = None, driver_memory: Optional[str] = None, executor_cores: Optional[int] = None, executor_memory: Optional[str] = None, executor_instances: Optional[int] = None, dynamic_allocation_enabled: Optional[bool] = None, dynamic_allocation_min_executors: Optional[int] = None, dynamic_allocation_max_executors: Optional[int] = None, conf: Optional[Dict[str, str]] = None, environment: Optional[Union[str, azure.ai.ml.entities._assets.environment.Environment]] = None, inputs: Optional[Dict] = None, outputs: Optional[Dict] = None, args: Optional[str] = None, compute: Optional[str] = None, resources: Optional[Union[Dict, azure.ai.ml.entities._job.spark_resource_configuration.SparkResourceConfiguration]] = None, **kwargs)azure.ai.ml.entities._builders.spark.Spark[source]

Creates a Spark object which can be used inside a dsl.pipeline function or used as a standalone Spark job.

Keyword Arguments
  • experiment_name (Optional[str]) – The name of the experiment the job will be created under.

  • name (Optional[str]) – The name of the job.

  • display_name (Optional[str]) – The job display name.

  • description (Optional[str]) – The description of the job. Defaults to None.

  • tags (Optional[dict[str, str]]) – The dictionary of tags for the job. Tags can be added, removed, and updated. Defaults to None.

  • code – The source code to run the job. Can be a local path or “http:”, “https:”, or “azureml:” url pointing to a remote location.

  • entry (Optional[Union[dict[str, str], SparkJobEntry]]) – The file or class entry point.

  • py_files (Optional[list[str]]) – The list of .zip, .egg or .py files to place on the PYTHONPATH for Python apps. Defaults to None.

  • jars (Optional[list[str]]) – The list of .JAR files to include on the driver and executor classpaths. Defaults to None.

  • files (Optional[list[str]]) – The list of files to be placed in the working directory of each executor. Defaults to None.

  • archives (Optional[list[str]]) – The list of archives to be extracted into the working directory of each executor. Defaults to None.

  • identity (Optional[Union[ dict[str, str], ManagedIdentityConfiguration, AmlTokenConfiguration, UserIdentityConfiguration]]) – The identity that the Spark job will use while running on compute.

  • driver_cores (Optional[int]) – The number of cores to use for the driver process, only in cluster mode.

  • driver_memory (Optional[str]) – The amount of memory to use for the driver process, formatted as strings with a size unit suffix (“k”, “m”, “g” or “t”) (e.g. “512m”, “2g”).

  • executor_cores (Optional[int]) – The number of cores to use on each executor.

  • executor_memory (Optional[str]) – The amount of memory to use per executor process, formatted as strings with a size unit suffix (“k”, “m”, “g” or “t”) (e.g. “512m”, “2g”).

  • executor_instances (Optional[int]) – The initial number of executors.

  • dynamic_allocation_enabled (Optional[bool]) – Whether to use dynamic resource allocation, which scales the number of executors registered with this application up and down based on the workload.

  • dynamic_allocation_min_executors (Optional[int]) – The lower bound for the number of executors if dynamic allocation is enabled.

  • dynamic_allocation_max_executors (Optional[int]) – The upper bound for the number of executors if dynamic allocation is enabled.

  • conf (Optional[dict[str, str]]) – A dictionary with pre-defined Spark configurations key and values. Defaults to None.

  • environment (Optional[Union[str, Environment]]) – The Azure ML environment to run the job in.

  • inputs (Optional[dict[str, Input]]) – A mapping of input names to input data used in the job. Defaults to None.

  • outputs (Optional[dict[str, Output]]) – A mapping of output names to output data used in the job. Defaults to None.

  • args (Optional[str]) – The arguments for the job.

  • compute (Optional[str]) – The compute resource the job runs on.

  • resources (Optional[Union[dict, SparkResourceConfiguration]]) – The compute resource configuration for the job.

Returns

A Spark object.

Return type

Spark

Subpackages

Submodules

azure.ai.ml.exceptions module

Contains exception module in Azure Machine Learning SDKv2.

This includes enums and classes for exceptions.

exception azure.ai.ml.exceptions.AssetException(message: str, no_personal_data_message: str, *args, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'Unknown', **kwargs)[source]

Class for all exceptions related to Assets.

Parameters
  • message (str) – A message describing the error. This is the error message the user will see.

  • no_personal_data_message (str) – The error message without any personal data. This will be pushed to telemetry logs.

  • target (ErrorTarget) – The name of the element that caused the exception to be thrown.

  • error_category (ErrorCategory) – The error category, defaults to Unknown.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.AssetPathException(message: str, no_personal_data_message: str, *args, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'Unknown', **kwargs)[source]

Class for the exception raised when an attempt is made to update the path of an existing asset. Asset paths are immutable.

Parameters
  • message (str) – A message describing the error. This is the error message the user will see.

  • no_personal_data_message (str) – The error message without any personal data. This will be pushed to telemetry logs.

  • target (ErrorTarget) – The name of the element that caused the exception to be thrown.

  • error_category (ErrorCategory) – The error category, defaults to Unknown.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.CannotSetAttributeError(object_name)[source]

Exception raised when a user try setting attributes of inputs/outputs.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.CloudArtifactsNotSupportedError(endpoint_name: str, invalid_artifact: str, deployment_name: Optional[str] = None, error_category='UserError')[source]

Exception raised when remote cloud artifacts are used with local endpoints.

Local endpoints only support local artifacts.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.ComponentException(message: str, no_personal_data_message: str, *args, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'Unknown', **kwargs)[source]

Class for all exceptions related to Components.

Parameters
  • message (str) – A message describing the error. This is the error message the user will see.

  • no_personal_data_message (str) – The error message without any personal data. This will be pushed to telemetry logs.

  • target (ErrorTarget) – The name of the element that caused the exception to be thrown.

  • error_category (ErrorCategory) – The error category, defaults to Unknown.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.DeploymentException(message: str, no_personal_data_message: str, *args, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'Unknown', **kwargs)[source]

Class for all exceptions related to Deployments.

Parameters
  • message (str) – A message describing the error. This is the error message the user will see.

  • no_personal_data_message (str) – The error message without any personal data. This will be pushed to telemetry logs.

  • target (ErrorTarget) – The name of the element that caused the exception to be thrown.

  • error_category (ErrorCategory) – The error category, defaults to Unknown.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.DockerEngineNotAvailableError(error_category='Unknown')[source]

Exception raised when local Docker Engine is unavailable for local operation.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.EmptyDirectoryError(message: str, no_personal_data_message: str, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'Unknown')[source]

Exception raised when an empty directory is provided as input for an I/O operation.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.InvalidLocalEndpointError(message: str, no_personal_data_message: str, error_category='UserError')[source]

Exception raised when local endpoint is invalid.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.InvalidVSCodeRequestError(error_category='UserError', msg=None)[source]

Exception raised when VS Code Debug is invoked with a remote endpoint.

VSCode debug is only supported for local endpoints.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.JobException(message: str, no_personal_data_message: str, *args, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'Unknown', **kwargs)[source]

Class for all exceptions related to Jobs.

Parameters
  • message (str) – A message describing the error. This is the error message the user will see.

  • no_personal_data_message (str) – The error message without any personal data. This will be pushed to telemetry logs.

  • target (ErrorTarget) – The name of the element that caused the exception to be thrown.

  • error_category (ErrorCategory) – The error category, defaults to Unknown.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.JobParsingError(error_category, no_personal_data_message, message, *args, **kwargs)[source]

Exception that the job data returned by MFE cannot be parsed.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.KeywordError(message, no_personal_data_message=None)[source]

Super class of all type keyword error.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.LocalDeploymentGPUNotAvailable(error_category='UserError', msg=None)[source]

Exception raised when local_enable_gpu is set and Nvidia GPU is not available.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.LocalEndpointImageBuildError(error: Union[str, Exception], error_category='Unknown')[source]

Exception raised when local endpoint’s Docker image build is unsuccessful.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.LocalEndpointInFailedStateError(endpoint_name, deployment_name=None, error_category='Unknown')[source]

Exception raised when local endpoint is in Failed state.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.LocalEndpointNotFoundError(endpoint_name: str, deployment_name: Optional[str] = None, error_category='UserError')[source]

Exception raised if local endpoint cannot be found.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.MissingPositionalArgsError(func_name, missing_args)[source]

Exception raised when missing positional keyword parameter in dynamic functions.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.MlException(message: str, no_personal_data_message: str, *args, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'Unknown', **kwargs)[source]

The base class for all exceptions raised in AzureML SDK code base. If there is a need to define a custom exception type, that custom exception type should extend from this class.

Parameters
  • message (str) – A message describing the error. This is the error message the user will see.

  • no_personal_data_message (str) – The error message without any personal data. This will be pushed to telemetry logs.

  • target (ErrorTarget) – The name of the element that caused the exception to be thrown.

  • error_category (ErrorCategory) – The error category, defaults to Unknown.

  • error (Exception) – The original exception if any.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.ModelException(message: str, no_personal_data_message: str, *args, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'Unknown', **kwargs)[source]

Class for all exceptions related to Models.

Parameters
  • message (str) – A message describing the error. This is the error message the user will see.

  • no_personal_data_message (str) – The error message without any personal data. This will be pushed to telemetry logs.

  • target (ErrorTarget) – The name of the element that caused the exception to be thrown.

  • error_category (ErrorCategory) – The error category, defaults to Unknown.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.MultipleLocalDeploymentsFoundError(endpoint_name: str, error_category='Unknown')[source]

Exception raised when no deployment name is specified for local endpoint even though multiple deployments exist.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.MultipleValueError(func_name, keyword)[source]

Exception raised when giving multiple value of a keyword parameter in dynamic functions.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.ParamValueNotExistsError(func_name, keywords)[source]

Exception raised when items in non_pipeline_inputs not in keyword parameters in dynamic functions.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.PipelineChildJobError(job_id: str, command: str = 'parse', prompt_studio_ui: bool = False)[source]

Exception that the pipeline child job is not supported.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

ERROR_MESSAGE_TEMPLATE = 'az ml job {command} is not supported on pipeline child job, {prompt_message}.' PROMPT_PARENT_MESSAGE = 'please use this command on pipeline parent job' PROMPT_STUDIO_UI_MESSAGE = 'please go to studio UI to do related actions{url}' args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.RequiredLocalArtifactsNotFoundError(endpoint_name: str, required_artifact: str, required_artifact_type: str, deployment_name: Optional[str] = None, error_category='UserError')[source]

Exception raised when local artifact is not provided for local endpoint.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.ScheduleException(message: str, no_personal_data_message: str, *args, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'Unknown', **kwargs)[source]

Class for all exceptions related to Job Schedules.

Parameters
  • message (str) – A message describing the error. This is the error message the user will see.

  • no_personal_data_message (str) – The error message without any personal data. This will be pushed to telemetry logs.

  • target (ErrorTarget) – The name of the element that caused the exception to be thrown.

  • error_category (ErrorCategory) – The error category, defaults to Unknown.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.TooManyPositionalArgsError(func_name, min_number, max_number, given_number)[source]

Exception raised when too many positional arguments is provided in dynamic functions.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.UnexpectedAttributeError(keyword, keywords=None)[source]

Exception raised when an unexpected keyword is invoked by attribute, e.g. inputs.invalid_key.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.UnexpectedKeywordError(func_name, keyword, keywords=None)[source]

Exception raised when an unexpected keyword parameter is provided in dynamic functions.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.UnsupportedOperationError(operation_name)[source]

Exception raised when specified operation is not supported.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.UnsupportedParameterKindError(func_name, parameter_kind=None)[source]

Exception raised when a user try setting attributes of inputs/outputs.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.UserErrorException(message, no_personal_data_message=None, error_category='UserError', target: azure.ai.ml.exceptions.ErrorTarget = 'Pipeline')[source]

Exception raised when invalid or unsupported inputs are provided.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.VSCodeCommandNotFound(output=None, error_category='UserError')[source]

Exception raised when VSCode instance cannot be instantiated.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

exception azure.ai.ml.exceptions.ValidationException(message: str, no_personal_data_message: str, *args, error_type: azure.ai.ml.exceptions.ValidationErrorType = <ValidationErrorType.GENERIC: 'GENERIC'>, target: azure.ai.ml.exceptions.ErrorTarget = 'Unknown', error_category: azure.ai.ml.exceptions.ErrorCategory = 'UserError', **kwargs)[source]

Class for all exceptions raised as part of client-side schema validation.

Parameters
  • message (str) – A message describing the error. This is the error message the user will see.

  • no_personal_data_message (str) – The error message without any personal data. This will be pushed to telemetry logs.

  • error_type (ValidationErrorType) – The error type, chosen from one of the values of ValidationErrorType enum class.

  • target (ErrorTarget) – The name of the element that caused the exception to be thrown.

  • error_category (ErrorCategory) – The error category, defaults to Unknown.

  • error (Exception) – The original exception if any.

raise_with_traceback()None

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don’t support Python 2 anymore. Use raise/from instead.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args continuation_token: Optional[str] property error_category

Return the error category.

Returns

The error category.

Return type

ErrorCategory

property error_type

Return the error type.

Returns

The error type.

Return type

ValidationErrorType

exc_msg: str exc_traceback: Optional[TracebackType] exc_type: Optional[Type[Any]] exc_value: Optional[BaseException] inner_exception: Optional[BaseException] message: Optional[str] property no_personal_data_message

Return the error message with no personal data.

Returns

No personal data error message.

Return type

str

property target

Return the error target.

Returns

The error target.

Return type

ErrorTarget

class azure.ai.ml.exceptions.ErrorCategory[source] SYSTEM_ERROR = 'SystemError' UNKNOWN = 'Unknown' USER_ERROR = 'UserError' class azure.ai.ml.exceptions.ErrorTarget[source] ARM_DEPLOYMENT = 'ArmDeployment' ARM_RESOURCE = 'ArmResource' ARTIFACT = 'Artifact' ASSET = 'Asset' AUTOML = 'AutoML' BATCH_DEPLOYMENT = 'BatchDeployment' BATCH_ENDPOINT = 'BatchEndpoint' BLOB_DATASTORE = 'BlobDatastore' CODE = 'Code' COMMAND_JOB = 'CommandJob' COMPONENT = 'Component' COMPUTE = 'Compute' DATA = 'Data' DATASTORE = 'Datastore' DATA_TRANSFER_JOB = 'DataTransferJob' DEPLOYMENT = 'Deployment' ENDPOINT = 'Endpoint' ENVIRONMENT = 'Environment' FEATURE_SET = 'FeatureSet' FEATURE_STORE_ENTITY = 'FeatureStoreEntity' FILE_DATASTORE = 'FileDatastore' GEN1_DATASTORE = 'Gen1Datastore' GEN2_DATASTORE = 'Gen2Datastore' GENERAL = 'General' IDENTITY = 'Identity' JOB = 'Job' LOCAL_ENDPOINT = 'LocalEndpoint' LOCAL_JOB = 'LocalJob' MODEL = 'Model' ONLINE_DEPLOYMENT = 'OnlineDeployment' ONLINE_ENDPOINT = 'OnlineEndpoint' PIPELINE = 'Pipeline' REGISTRY = 'Registry' SCHEDULE = 'Schedule' SPARK_JOB = 'SparkJob' SWEEP_JOB = 'SweepJob' UNKNOWN = 'Unknown' WORKSPACE = 'Workspace' class azure.ai.ml.exceptions.ValidationErrorType(value)[source]

Error types to be specified when using ValidationException class. Types are then used in raise_error.py to format a detailed error message for users.

When using ValidationException, specify the type that best describes the nature of the error being captured. If no type fits, add a new enum here and update raise_error.py to handle it.

Types of validation errors:

  • INVALID_VALUE -> One or more schema fields are invalid (e.g. incorrect type or format)

  • UNKNOWN_FIELD -> A least one unrecognized schema parameter is specified

  • MISSING_FIELD -> At least one required schema parameter is missing

  • FILE_OR_FOLDER_NOT_FOUND -> One or more files or folder paths do not exist

  • CANNOT_SERIALIZE -> Same as “Cannot dump”. One or more fields cannot be serialized by marshmallow.

  • CANNOT_PARSE -> YAML file cannot be parsed

  • RESOURCE_NOT_FOUND -> Resource could not be found

  • GENERIC -> Undefined placeholder. Avoid using.

CANNOT_PARSE = 'CANNOT PARSE' CANNOT_SERIALIZE = 'CANNOT DUMP' FILE_OR_FOLDER_NOT_FOUND = 'FILE OR FOLDER NOT FOUND' GENERIC = 'GENERIC' INVALID_VALUE = 'INVALID VALUE' MISSING_FIELD = 'MISSING FIELD' RESOURCE_NOT_FOUND = 'RESOURCE NOT FOUND' UNKNOWN_FIELD = 'UNKNOWN FIELD'

ncG1vNJzZmiZqqq%2Fpr%2FDpJuom6Njr627wWeaqKqVY8SqusOorqxmnprBcHDWnploqKmptbC6jpqxrqqVYq6qecylZmpmYWV7cnvAs6yrnV6Wtm%2B5y2efraWc