ParallelComponent Class

Parallel component version, used to define a parallel component.

Inheritance
azure.ai.ml.entities._component.component.Component
ParallelComponent
azure.ai.ml.entities._job.parallel.parameterized_parallel.ParameterizedParallel
ParallelComponent
azure.ai.ml.entities._component.code.ComponentCodeMixin
ParallelComponent

Constructor

ParallelComponent(*, name: str | None = None, version: str | None = None, description: str | None = None, tags: Dict[str, Any] | None = None, display_name: str | None = None, retry_settings: RetrySettings | None = None, logging_level: str | None = None, max_concurrency_per_instance: int | None = None, error_threshold: int | None = None, mini_batch_error_threshold: int | None = None, task: ParallelTask | None = None, mini_batch_size: str | None = None, partition_keys: List | None = None, input_data: str | None = None, resources: JobResourceConfiguration | None = None, inputs: Dict | None = None, outputs: Dict | None = None, code: str | None = None, instance_count: int | None = None, is_deterministic: bool = True, **kwargs: Any)

Parameters

Name Description
name
Required
str

Name of the component. Defaults to None

version
Required
str

Version of the component. Defaults to None

description
Required
str

Description of the component. Defaults to None

tags
Required

Tag dictionary. Tags can be added, removed, and updated. Defaults to None

display_name
Required
str

Display name of the component. Defaults to None

retry_settings
Required

parallel component run failed retry. Defaults to None

logging_level
Required
str

A string of the logging level name. Defaults to None

max_concurrency_per_instance
Required
int

The max parallellism that each compute instance has. Defaults to None

error_threshold
Required
int

The number of item processing failures should be ignored. Defaults to None

mini_batch_error_threshold
Required
int

The number of mini batch processing failures should be ignored. Defaults to None

task
Required

The parallel task. Defaults to None

mini_batch_size
Required
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.

partition_keys
Required

The keys used to partition dataset into mini-batches. Defaults to None If specified, the data with the same key will be partitioned into the same mini-batch. If both partition_keys and mini_batch_size are specified, partition_keys will take effect. The input(s) must be partitioned dataset(s), and the partition_keys must be a subset of the keys of every input dataset for this to work.

input_data
Required
str

The input data. Defaults to None

resources
Required

Compute Resource configuration for the component. Defaults to None

inputs
Required

Inputs of the component. Defaults to None

outputs
Required

Outputs of the component. Defaults to None

code
Required
str

promoted property from task.code

instance_count
Required
int

promoted property from resources.instance_count. Defaults to None

is_deterministic
Required

Whether the parallel component is deterministic. Defaults to True

Keyword-Only Parameters

Name Description
name
Required
version
Required
description
Required
tags
Required
display_name
Required
retry_settings
Required
logging_level
Required
max_concurrency_per_instance
Required
error_threshold
Required
mini_batch_error_threshold
Required
task
Required
mini_batch_size
Required
partition_keys
Required
input_data
Required
resources
Required
inputs
Required
outputs
Required
code
Required
instance_count
Required
is_deterministic
Default value: True

Methods

dump

Dump the component content into a file in yaml format.

dump

Dump the component content into a file in yaml format.

dump(dest: str | PathLike | IO, **kwargs: Any) -> None

Parameters

Name Description
dest
Required
Union[<xref:PathLike>, str, IO[AnyStr]]

The destination to receive this component's content. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable.

Attributes

base_path

The base path of the resource.

Returns

Type Description
str

The base path of the resource.

code

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

Returns

Type Description

Value of task.code.

creation_context

The creation context of the resource.

Returns

Type Description

The creation metadata for the resource.

display_name

Display name of the component.

Returns

Type Description
str

Display name of the component.

environment

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

Returns

Type Description

Value of task.environment.

id

The resource ID.

Returns

Type Description

The global ID of the resource, an Azure Resource Manager (ARM) ID.

inputs

Inputs of the component.

Returns

Type Description

Inputs of the component.

instance_count

Return value of promoted property resources.instance_count.

Returns

Type Description

Value of resources.instance_count.

is_deterministic

Whether the component is deterministic.

Returns

Type Description

Whether the component is deterministic

outputs

Outputs of the component.

Returns

Type Description

Outputs of the component.

resources

retry_settings

task

type

Type of the component, default is 'command'.

Returns

Type Description
str

Type of the component.

version

Version of the component.

Returns

Type Description
str

Version of the component.