title | titleSuffix | description | services | ms.service | ms.subservice | ms.topic | ms.custom | author | ms.author | ms.date | ms.reviewer |
---|---|---|---|---|---|---|---|---|---|---|---|
CLI (v2) command component YAML schema |
Azure Machine Learning |
Reference documentation for the CLI (v2) command component YAML schema. |
machine-learning |
machine-learning |
core |
reference |
cliv2, event-tier1-build-2022 |
lostmygithubaccount |
copeters |
03/31/2022 |
larryfr |
[!INCLUDE cli v2]
The source JSON schema can be found at https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json.
[!INCLUDE schema note]
Key | Type | Description | Allowed values | Default value |
---|---|---|---|---|
$schema |
string | The YAML schema. If you use the Azure Machine Learning VS Code extension to author the YAML file, including $schema at the top of your file enables you to invoke schema and resource completions. |
||
type |
const | The type of component. | command |
command |
name |
string | Required. Name of the component. | ||
version |
string | Version of the component. If omitted, Azure ML will autogenerate a version. | ||
display_name |
string | Display name of the component in the studio UI. Can be non-unique within the workspace. | ||
description |
string | Description of the component. | ||
tags |
object | Dictionary of tags for the component. | ||
command |
string | Required. The command to execute. | ||
code |
string | Local path to the source code directory to be uploaded and used for the component. | ||
environment |
string or object | Required. The environment to use for the component. This value can be either a reference to an existing versioned environment in the workspace or an inline environment specification. To reference an existing environment, use the azureml:<environment-name>:<environment-version> syntax. To define an environment inline, follow the Environment schema. Exclude the name and version properties as they are not supported for inline environments. |
||
distribution |
object | The distribution configuration for distributed training scenarios. One of MpiConfiguration, PyTorchConfiguration, or TensorFlowConfiguration. | ||
resources.instance_count |
integer | The number of nodes to use for the job. | 1 |
|
inputs |
object | Dictionary of component inputs. The key is a name for the input within the context of the component and the value is the component input definition. Inputs can be referenced in the command using the ${{ inputs.<input_name> }} expression. |
||
inputs.<input_name> |
object | The component input definition. See Component input for the set of configurable properties. | ||
outputs |
object | Dictionary of component outputs. The key is a name for the output within the context of the component and the value is the component output definition. Outputs can be referenced in the command using the ${{ outputs.<output_name> }} expression. |
||
outputs.<output_name> |
object | The component output definition. See Component output for the set of configurable properties. |
Key | Type | Description | Allowed values |
---|---|---|---|
type |
const | Required. Distribution type. | mpi |
process_count_per_instance |
integer | Required. The number of processes per node to launch for the job. |
Key | Type | Description | Allowed values | Default value |
---|---|---|---|---|
type |
const | Required. Distribution type. | pytorch |
|
process_count_per_instance |
integer | The number of processes per node to launch for the job. | 1 |
Key | Type | Description | Allowed values | Default value |
---|---|---|---|---|
type |
const | Required. Distribution type. | tensorflow |
|
worker_count |
integer | The number of workers to launch for the job. | Defaults to resources.instance_count . |
|
parameter_server_count |
integer | The number of parameter servers to launch for the job. | 0 |
Key | Type | Description | Allowed values | Default value |
---|---|---|---|---|
type |
string | Required. The type of component input. Use type: uri_file/uri_folder if you want the runtime job input value to be a data URI or registered Azure ML data asset when the component is run. |
number , integer , boolean , string , uri_file , uri_folder |
|
description |
string | Description of the input. | ||
default |
number, integer, boolean, or string | The default value for the input. | ||
optional |
boolean | Whether the input is required. | false |
|
min |
integer or number | The minimum accepted value for the input. This field can only be specified if type field is number or integer . |
||
max |
integer or number | The maximum accepted value for the input. This field can only be specified if type field is number or integer . |
||
enum |
array | The list of allowed values for the input. Not applicable if type field is boolean . |
Key | Type | Description | Allowed values | Default value |
---|---|---|---|---|
type |
string | Required. The type of component output. | uri_folder |
|
description |
string | Description of the output. |
The az ml component
commands can be used for managing Azure Machine Learning components.
Command component examples are available in the examples GitHub repository. Select examples for are shown below.
Examples are available in the examples GitHub repository. Several are shown below.
:::code language="yaml" source="~/azureml-examples-main/cli/jobs/pipelines-with-components/basics/2a_basic_component/component.yml":::