Microsoft.MachineLearningServices workspaces/jobs 2021-03-01-preview
Bicep resource definition
The workspaces/jobs resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.MachineLearningServices/workspaces/jobs resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.MachineLearningServices/workspaces/jobs@2021-03-01-preview' = {
name: 'string'
parent: resourceSymbolicName
properties: {
description: 'string'
properties: {
{customized property}: 'string'
}
tags: {}
jobType: 'string'
// For remaining properties, see JobBase objects
}
}
JobBase objects
Set the jobType property to specify the type of object.
For Command, use:
jobType: 'Command'
codeId: 'string'
command: 'string'
compute: {
instanceCount: int
instanceType: 'string'
isLocal: bool
location: 'string'
properties: {
{customized property}: 'string'
}
target: 'string'
}
distribution: {
distributionType: 'string'
// For remaining properties, see DistributionConfiguration objects
}
environmentId: 'string'
environmentVariables: {
{customized property}: 'string'
}
experimentName: 'string'
identity: {
identityType: 'string'
// For remaining properties, see IdentityConfiguration objects
}
inputDataBindings: {
{customized property}: {
dataId: 'string'
mode: 'string'
pathOnCompute: 'string'
}
}
outputDataBindings: {
{customized property}: {
datastoreId: 'string'
mode: 'string'
pathOnCompute: 'string'
pathOnDatastore: 'string'
}
}
priority: int
timeout: 'string'
For Sweep, use:
jobType: 'Sweep'
algorithm: 'string'
compute: {
instanceCount: int
instanceType: 'string'
isLocal: bool
location: 'string'
properties: {
{customized property}: 'string'
}
target: 'string'
}
earlyTermination: {
delayEvaluation: int
evaluationInterval: int
policyType: 'string'
// For remaining properties, see EarlyTerminationPolicy objects
}
experimentName: 'string'
identity: {
identityType: 'string'
// For remaining properties, see IdentityConfiguration objects
}
maxConcurrentTrials: int
maxTotalTrials: int
objective: {
goal: 'string'
primaryMetric: 'string'
}
priority: int
searchSpace: {
{customized property}: any()
}
timeout: 'string'
trial: {
codeId: 'string'
command: 'string'
distribution: {
distributionType: 'string'
// For remaining properties, see DistributionConfiguration objects
}
environmentId: 'string'
environmentVariables: {
{customized property}: 'string'
}
inputDataBindings: {
{customized property}: {
dataId: 'string'
mode: 'string'
pathOnCompute: 'string'
}
}
outputDataBindings: {
{customized property}: {
datastoreId: 'string'
mode: 'string'
pathOnCompute: 'string'
pathOnDatastore: 'string'
}
}
timeout: 'string'
}
DistributionConfiguration objects
Set the distributionType property to specify the type of object.
For Mpi, use:
distributionType: 'Mpi'
processCountPerInstance: int
For PyTorch, use:
distributionType: 'PyTorch'
processCount: int
For TensorFlow, use:
distributionType: 'TensorFlow'
parameterServerCount: int
workerCount: int
IdentityConfiguration objects
Set the identityType property to specify the type of object.
For AMLToken, use:
identityType: 'AMLToken'
For Managed, use:
identityType: 'Managed'
clientId: 'string'
objectId: 'string'
resourceId: 'string'
EarlyTerminationPolicy objects
Set the policyType property to specify the type of object.
For Bandit, use:
policyType: 'Bandit'
slackAmount: int
slackFactor: int
For MedianStopping, use:
policyType: 'MedianStopping'
For TruncationSelection, use:
policyType: 'TruncationSelection'
truncationPercentage: int
Property values
workspaces/jobs
Name | Description | Value |
---|---|---|
name | The resource name See how to set names and types for child resources in Bicep. |
string (required) |
parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: workspaces |
properties | [Required] Additional attributes of the entity. | JobBase (required) |
JobBase
Name | Description | Value |
---|---|---|
description | The asset description text. | string |
properties | The asset property dictionary. | JobBaseProperties |
tags | Tag dictionary. Tags can be added, removed, and updated. | object |
jobType | Set the object type | Command Sweep (required) |
JobBaseProperties
Name | Description | Value |
---|---|---|
{customized property} | string |
CommandJob
Name | Description | Value |
---|---|---|
jobType | [Required] Specifies the type of job. | 'Command' (required) |
codeId | ARM resource ID of the code asset. | string |
command | [Required] The command to execute on startup of the job. eg. "python train.py" | string (required) Constraints: Min length = 1 Pattern = [a-zA-Z0-9_] |
compute | [Required] Compute binding for the job. | ComputeConfiguration (required) |
distribution | Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. | DistributionConfiguration |
environmentId | The ARM resource ID of the Environment specification for the job. | string |
environmentVariables | Environment variables included in the job. | CommandJobEnvironmentVariables |
experimentName | The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. | string |
identity | Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, or null. Defaults to AmlToken if null. |
IdentityConfiguration |
inputDataBindings | Mapping of input data bindings used in the job. | CommandJobInputDataBindings |
outputDataBindings | Mapping of output data bindings used in the job. | CommandJobOutputDataBindings |
priority | Job priority for scheduling policy. Only applies to AMLCompute. Private preview feature and only available to users on the allow list. |
int |
timeout | The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. | string |
ComputeConfiguration
Name | Description | Value |
---|---|---|
instanceCount | Number of instances or nodes. | int |
instanceType | SKU type to run on. | string |
isLocal | Set to true for jobs running on local compute. | bool |
location | Location for virtual cluster run. | string |
properties | Additional properties. | ComputeConfigurationProperties |
target | ARM resource ID of the Compute you are targeting. If not provided the resource will be deployed as Managed. | string |
ComputeConfigurationProperties
Name | Description | Value |
---|---|---|
{customized property} | string |
DistributionConfiguration
Name | Description | Value |
---|---|---|
distributionType | Set the object type | Mpi PyTorch TensorFlow (required) |
Mpi
Name | Description | Value |
---|---|---|
distributionType | [Required] Specifies the type of distribution framework. | 'Mpi' (required) |
processCountPerInstance | Number of processes per MPI node. | int |
PyTorch
Name | Description | Value |
---|---|---|
distributionType | [Required] Specifies the type of distribution framework. | 'PyTorch' (required) |
processCount | Total process count for the distributed job. | int |
TensorFlow
Name | Description | Value |
---|---|---|
distributionType | [Required] Specifies the type of distribution framework. | 'TensorFlow' (required) |
parameterServerCount | Number of parameter server tasks. | int |
workerCount | Number of workers. Overwrites the node count in compute binding. | int |
CommandJobEnvironmentVariables
Name | Description | Value |
---|---|---|
{customized property} | string |
IdentityConfiguration
Name | Description | Value |
---|---|---|
identityType | Set the object type | AMLToken Managed (required) |
AmlToken
Name | Description | Value |
---|---|---|
identityType | [Required] Specifies the type of identity framework. | 'AMLToken' (required) |
ManagedIdentity
Name | Description | Value |
---|---|---|
identityType | [Required] Specifies the type of identity framework. | 'Managed' (required) |
clientId | Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ |
objectId | Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ |
resourceId | Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. | string |
CommandJobInputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | InputDataBinding |
InputDataBinding
Name | Description | Value |
---|---|---|
dataId | ARM resource ID of the registered dataVersion. | string |
mode | Mechanism for accessing the data artifact. | 'Direct' 'Download' 'EvalDownload' 'EvalMount' 'Mount' 'ReadOnlyMount' 'ReadWriteMount' 'Upload' |
pathOnCompute | Location of data inside the container process. | string |
CommandJobOutputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | OutputDataBinding |
OutputDataBinding
Name | Description | Value |
---|---|---|
datastoreId | ARM resource ID of the datastore where the data output will be stored. | string |
mode | Mechanism for data movement to datastore. | 'Direct' 'Download' 'EvalDownload' 'EvalMount' 'Mount' 'ReadOnlyMount' 'ReadWriteMount' 'Upload' |
pathOnCompute | Location of data inside the container process. | string |
pathOnDatastore | Path within the datastore to the data. | string |
SweepJob
Name | Description | Value |
---|---|---|
jobType | [Required] Specifies the type of job. | 'Sweep' (required) |
algorithm | [Required] Type of the hyperparameter sampling algorithms | 'Bayesian' 'Grid' 'Random' (required) |
compute | [Required] Compute binding for the job. | ComputeConfiguration (required) |
earlyTermination | Early termination policies enable canceling poor-performing runs before they complete. | EarlyTerminationPolicy |
experimentName | The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. | string |
identity | Identity configuration. If set, this should be one of AmlToken, ManagedIdentity or null. Defaults to AmlToken if null. |
IdentityConfiguration |
maxConcurrentTrials | An upper bound on the number of trials performed in parallel. | int |
maxTotalTrials | An upper bound on the number of trials to perform. | int |
objective | [Required] Optimization objective. | Objective (required) |
priority | Job priority for scheduling policy. Only applies to AMLCompute. Private preview feature and only available to users on the allow list. |
int |
searchSpace | [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter | SweepJobSearchSpace (required) |
timeout | The total timeout in ISO 8601 format. Only supports duration with precision as low as Minutes. | string |
trial | Trial component definition. | TrialComponent |
EarlyTerminationPolicy
Name | Description | Value |
---|---|---|
delayEvaluation | Number of intervals by which to delay the first evaluation. | int |
evaluationInterval | Interval (number of runs) between policy evaluations. | int |
policyType | Set the object type | Bandit MedianStopping TruncationSelection (required) |
BanditPolicy
Name | Description | Value |
---|---|---|
policyType | [Required] Name of policy configuration | 'Bandit' (required) |
slackAmount | Absolute distance allowed from the best performing run. | int |
slackFactor | Ratio of the allowed distance from the best performing run. | int |
MedianStoppingPolicy
Name | Description | Value |
---|---|---|
policyType | [Required] Name of policy configuration | 'MedianStopping' (required) |
TruncationSelectionPolicy
Name | Description | Value |
---|---|---|
policyType | [Required] Name of policy configuration | 'TruncationSelection' (required) |
truncationPercentage | The percentage of runs to cancel at each evaluation interval. | int |
Objective
Name | Description | Value |
---|---|---|
goal | [Required] Defines supported metric goals for hyperparameter tuning | 'Maximize' 'Minimize' (required) |
primaryMetric | [Required] Name of the metric to optimize. | string (required) Constraints: Pattern = [a-zA-Z0-9_] |
SweepJobSearchSpace
Name | Description | Value |
---|---|---|
{customized property} | For Bicep, you can use the any() function. |
TrialComponent
Name | Description | Value |
---|---|---|
codeId | ARM resource ID of the code asset. | string |
command | [Required] The command to execute on startup of the job. eg. "python train.py" | string (required) Constraints: Min length = 1 Pattern = [a-zA-Z0-9_] |
distribution | Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. | DistributionConfiguration |
environmentId | The ARM resource ID of the Environment specification for the job. | string |
environmentVariables | Environment variables included in the job. | TrialComponentEnvironmentVariables |
inputDataBindings | Mapping of input data bindings used in the job. | TrialComponentInputDataBindings |
outputDataBindings | Mapping of output data bindings used in the job. | TrialComponentOutputDataBindings |
timeout | The max run duration in ISO 8601 format, after which the trial component will be cancelled. Only supports duration with precision as low as Seconds. |
string |
TrialComponentEnvironmentVariables
Name | Description | Value |
---|---|---|
{customized property} | string |
TrialComponentInputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | InputDataBinding |
TrialComponentOutputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | OutputDataBinding |
Quickstart templates
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
Create an Azure Machine Learning AutoML classification job |
This template creates an Azure Machine Learning AutoML classification job to find out the best model for predicting if a client will subscribe to a fixed term deposit with a financial institution. |
Create an Azure Machine Learning Command job |
This template creates an Azure Machine Learning Command job with a basic hello_world script |
Create an Azure Machine Learning Sweep job |
This template creates an Azure Machine Learning Sweep job for hyperparameter tuning. |
ARM template resource definition
The workspaces/jobs resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.MachineLearningServices/workspaces/jobs resource, add the following JSON to your template.
{
"type": "Microsoft.MachineLearningServices/workspaces/jobs",
"apiVersion": "2021-03-01-preview",
"name": "string",
"properties": {
"description": "string",
"properties": {
"{customized property}": "string"
},
"tags": {},
"jobType": "string"
// For remaining properties, see JobBase objects
}
}
JobBase objects
Set the jobType property to specify the type of object.
For Command, use:
"jobType": "Command",
"codeId": "string",
"command": "string",
"compute": {
"instanceCount": "int",
"instanceType": "string",
"isLocal": "bool",
"location": "string",
"properties": {
"{customized property}": "string"
},
"target": "string"
},
"distribution": {
"distributionType": "string"
// For remaining properties, see DistributionConfiguration objects
},
"environmentId": "string",
"environmentVariables": {
"{customized property}": "string"
},
"experimentName": "string",
"identity": {
"identityType": "string"
// For remaining properties, see IdentityConfiguration objects
},
"inputDataBindings": {
"{customized property}": {
"dataId": "string",
"mode": "string",
"pathOnCompute": "string"
}
},
"outputDataBindings": {
"{customized property}": {
"datastoreId": "string",
"mode": "string",
"pathOnCompute": "string",
"pathOnDatastore": "string"
}
},
"priority": "int",
"timeout": "string"
For Sweep, use:
"jobType": "Sweep",
"algorithm": "string",
"compute": {
"instanceCount": "int",
"instanceType": "string",
"isLocal": "bool",
"location": "string",
"properties": {
"{customized property}": "string"
},
"target": "string"
},
"earlyTermination": {
"delayEvaluation": "int",
"evaluationInterval": "int",
"policyType": "string"
// For remaining properties, see EarlyTerminationPolicy objects
},
"experimentName": "string",
"identity": {
"identityType": "string"
// For remaining properties, see IdentityConfiguration objects
},
"maxConcurrentTrials": "int",
"maxTotalTrials": "int",
"objective": {
"goal": "string",
"primaryMetric": "string"
},
"priority": "int",
"searchSpace": {
"{customized property}": {}
},
"timeout": "string",
"trial": {
"codeId": "string",
"command": "string",
"distribution": {
"distributionType": "string"
// For remaining properties, see DistributionConfiguration objects
},
"environmentId": "string",
"environmentVariables": {
"{customized property}": "string"
},
"inputDataBindings": {
"{customized property}": {
"dataId": "string",
"mode": "string",
"pathOnCompute": "string"
}
},
"outputDataBindings": {
"{customized property}": {
"datastoreId": "string",
"mode": "string",
"pathOnCompute": "string",
"pathOnDatastore": "string"
}
},
"timeout": "string"
}
DistributionConfiguration objects
Set the distributionType property to specify the type of object.
For Mpi, use:
"distributionType": "Mpi",
"processCountPerInstance": "int"
For PyTorch, use:
"distributionType": "PyTorch",
"processCount": "int"
For TensorFlow, use:
"distributionType": "TensorFlow",
"parameterServerCount": "int",
"workerCount": "int"
IdentityConfiguration objects
Set the identityType property to specify the type of object.
For AMLToken, use:
"identityType": "AMLToken"
For Managed, use:
"identityType": "Managed",
"clientId": "string",
"objectId": "string",
"resourceId": "string"
EarlyTerminationPolicy objects
Set the policyType property to specify the type of object.
For Bandit, use:
"policyType": "Bandit",
"slackAmount": "int",
"slackFactor": "int"
For MedianStopping, use:
"policyType": "MedianStopping"
For TruncationSelection, use:
"policyType": "TruncationSelection",
"truncationPercentage": "int"
Property values
workspaces/jobs
Name | Description | Value |
---|---|---|
type | The resource type | 'Microsoft.MachineLearningServices/workspaces/jobs' |
apiVersion | The resource api version | '2021-03-01-preview' |
name | The resource name See how to set names and types for child resources in JSON ARM templates. |
string (required) |
properties | [Required] Additional attributes of the entity. | JobBase (required) |
JobBase
Name | Description | Value |
---|---|---|
description | The asset description text. | string |
properties | The asset property dictionary. | JobBaseProperties |
tags | Tag dictionary. Tags can be added, removed, and updated. | object |
jobType | Set the object type | Command Sweep (required) |
JobBaseProperties
Name | Description | Value |
---|---|---|
{customized property} | string |
CommandJob
Name | Description | Value |
---|---|---|
jobType | [Required] Specifies the type of job. | 'Command' (required) |
codeId | ARM resource ID of the code asset. | string |
command | [Required] The command to execute on startup of the job. eg. "python train.py" | string (required) Constraints: Min length = 1 Pattern = [a-zA-Z0-9_] |
compute | [Required] Compute binding for the job. | ComputeConfiguration (required) |
distribution | Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. | DistributionConfiguration |
environmentId | The ARM resource ID of the Environment specification for the job. | string |
environmentVariables | Environment variables included in the job. | CommandJobEnvironmentVariables |
experimentName | The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. | string |
identity | Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, or null. Defaults to AmlToken if null. |
IdentityConfiguration |
inputDataBindings | Mapping of input data bindings used in the job. | CommandJobInputDataBindings |
outputDataBindings | Mapping of output data bindings used in the job. | CommandJobOutputDataBindings |
priority | Job priority for scheduling policy. Only applies to AMLCompute. Private preview feature and only available to users on the allow list. |
int |
timeout | The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. | string |
ComputeConfiguration
Name | Description | Value |
---|---|---|
instanceCount | Number of instances or nodes. | int |
instanceType | SKU type to run on. | string |
isLocal | Set to true for jobs running on local compute. | bool |
location | Location for virtual cluster run. | string |
properties | Additional properties. | ComputeConfigurationProperties |
target | ARM resource ID of the Compute you are targeting. If not provided the resource will be deployed as Managed. | string |
ComputeConfigurationProperties
Name | Description | Value |
---|---|---|
{customized property} | string |
DistributionConfiguration
Name | Description | Value |
---|---|---|
distributionType | Set the object type | Mpi PyTorch TensorFlow (required) |
Mpi
Name | Description | Value |
---|---|---|
distributionType | [Required] Specifies the type of distribution framework. | 'Mpi' (required) |
processCountPerInstance | Number of processes per MPI node. | int |
PyTorch
Name | Description | Value |
---|---|---|
distributionType | [Required] Specifies the type of distribution framework. | 'PyTorch' (required) |
processCount | Total process count for the distributed job. | int |
TensorFlow
Name | Description | Value |
---|---|---|
distributionType | [Required] Specifies the type of distribution framework. | 'TensorFlow' (required) |
parameterServerCount | Number of parameter server tasks. | int |
workerCount | Number of workers. Overwrites the node count in compute binding. | int |
CommandJobEnvironmentVariables
Name | Description | Value |
---|---|---|
{customized property} | string |
IdentityConfiguration
Name | Description | Value |
---|---|---|
identityType | Set the object type | AMLToken Managed (required) |
AmlToken
Name | Description | Value |
---|---|---|
identityType | [Required] Specifies the type of identity framework. | 'AMLToken' (required) |
ManagedIdentity
Name | Description | Value |
---|---|---|
identityType | [Required] Specifies the type of identity framework. | 'Managed' (required) |
clientId | Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ |
objectId | Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ |
resourceId | Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. | string |
CommandJobInputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | InputDataBinding |
InputDataBinding
Name | Description | Value |
---|---|---|
dataId | ARM resource ID of the registered dataVersion. | string |
mode | Mechanism for accessing the data artifact. | 'Direct' 'Download' 'EvalDownload' 'EvalMount' 'Mount' 'ReadOnlyMount' 'ReadWriteMount' 'Upload' |
pathOnCompute | Location of data inside the container process. | string |
CommandJobOutputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | OutputDataBinding |
OutputDataBinding
Name | Description | Value |
---|---|---|
datastoreId | ARM resource ID of the datastore where the data output will be stored. | string |
mode | Mechanism for data movement to datastore. | 'Direct' 'Download' 'EvalDownload' 'EvalMount' 'Mount' 'ReadOnlyMount' 'ReadWriteMount' 'Upload' |
pathOnCompute | Location of data inside the container process. | string |
pathOnDatastore | Path within the datastore to the data. | string |
SweepJob
Name | Description | Value |
---|---|---|
jobType | [Required] Specifies the type of job. | 'Sweep' (required) |
algorithm | [Required] Type of the hyperparameter sampling algorithms | 'Bayesian' 'Grid' 'Random' (required) |
compute | [Required] Compute binding for the job. | ComputeConfiguration (required) |
earlyTermination | Early termination policies enable canceling poor-performing runs before they complete. | EarlyTerminationPolicy |
experimentName | The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. | string |
identity | Identity configuration. If set, this should be one of AmlToken, ManagedIdentity or null. Defaults to AmlToken if null. |
IdentityConfiguration |
maxConcurrentTrials | An upper bound on the number of trials performed in parallel. | int |
maxTotalTrials | An upper bound on the number of trials to perform. | int |
objective | [Required] Optimization objective. | Objective (required) |
priority | Job priority for scheduling policy. Only applies to AMLCompute. Private preview feature and only available to users on the allow list. |
int |
searchSpace | [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter | SweepJobSearchSpace (required) |
timeout | The total timeout in ISO 8601 format. Only supports duration with precision as low as Minutes. | string |
trial | Trial component definition. | TrialComponent |
EarlyTerminationPolicy
Name | Description | Value |
---|---|---|
delayEvaluation | Number of intervals by which to delay the first evaluation. | int |
evaluationInterval | Interval (number of runs) between policy evaluations. | int |
policyType | Set the object type | Bandit MedianStopping TruncationSelection (required) |
BanditPolicy
Name | Description | Value |
---|---|---|
policyType | [Required] Name of policy configuration | 'Bandit' (required) |
slackAmount | Absolute distance allowed from the best performing run. | int |
slackFactor | Ratio of the allowed distance from the best performing run. | int |
MedianStoppingPolicy
Name | Description | Value |
---|---|---|
policyType | [Required] Name of policy configuration | 'MedianStopping' (required) |
TruncationSelectionPolicy
Name | Description | Value |
---|---|---|
policyType | [Required] Name of policy configuration | 'TruncationSelection' (required) |
truncationPercentage | The percentage of runs to cancel at each evaluation interval. | int |
Objective
Name | Description | Value |
---|---|---|
goal | [Required] Defines supported metric goals for hyperparameter tuning | 'Maximize' 'Minimize' (required) |
primaryMetric | [Required] Name of the metric to optimize. | string (required) Constraints: Pattern = [a-zA-Z0-9_] |
SweepJobSearchSpace
Name | Description | Value |
---|---|---|
{customized property} |
TrialComponent
Name | Description | Value |
---|---|---|
codeId | ARM resource ID of the code asset. | string |
command | [Required] The command to execute on startup of the job. eg. "python train.py" | string (required) Constraints: Min length = 1 Pattern = [a-zA-Z0-9_] |
distribution | Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. | DistributionConfiguration |
environmentId | The ARM resource ID of the Environment specification for the job. | string |
environmentVariables | Environment variables included in the job. | TrialComponentEnvironmentVariables |
inputDataBindings | Mapping of input data bindings used in the job. | TrialComponentInputDataBindings |
outputDataBindings | Mapping of output data bindings used in the job. | TrialComponentOutputDataBindings |
timeout | The max run duration in ISO 8601 format, after which the trial component will be cancelled. Only supports duration with precision as low as Seconds. |
string |
TrialComponentEnvironmentVariables
Name | Description | Value |
---|---|---|
{customized property} | string |
TrialComponentInputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | InputDataBinding |
TrialComponentOutputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | OutputDataBinding |
Quickstart templates
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
Create an Azure Machine Learning AutoML classification job |
This template creates an Azure Machine Learning AutoML classification job to find out the best model for predicting if a client will subscribe to a fixed term deposit with a financial institution. |
Create an Azure Machine Learning Command job |
This template creates an Azure Machine Learning Command job with a basic hello_world script |
Create an Azure Machine Learning Sweep job |
This template creates an Azure Machine Learning Sweep job for hyperparameter tuning. |
Terraform (AzAPI provider) resource definition
The workspaces/jobs resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.MachineLearningServices/workspaces/jobs resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.MachineLearningServices/workspaces/jobs@2021-03-01-preview"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
description = "string"
properties = {
{customized property} = "string"
}
tags = {}
jobType = "string"
// For remaining properties, see JobBase objects
}
})
}
JobBase objects
Set the jobType property to specify the type of object.
For Command, use:
jobType = "Command"
codeId = "string"
command = "string"
compute = {
instanceCount = int
instanceType = "string"
isLocal = bool
location = "string"
properties = {
{customized property} = "string"
}
target = "string"
}
distribution = {
distributionType = "string"
// For remaining properties, see DistributionConfiguration objects
}
environmentId = "string"
environmentVariables = {
{customized property} = "string"
}
experimentName = "string"
identity {
identityType = "string"
// For remaining properties, see IdentityConfiguration objects
}
inputDataBindings = {
{customized property} = {
dataId = "string"
mode = "string"
pathOnCompute = "string"
}
}
outputDataBindings = {
{customized property} = {
datastoreId = "string"
mode = "string"
pathOnCompute = "string"
pathOnDatastore = "string"
}
}
priority = int
timeout = "string"
For Sweep, use:
jobType = "Sweep"
algorithm = "string"
compute = {
instanceCount = int
instanceType = "string"
isLocal = bool
location = "string"
properties = {
{customized property} = "string"
}
target = "string"
}
earlyTermination = {
delayEvaluation = int
evaluationInterval = int
policyType = "string"
// For remaining properties, see EarlyTerminationPolicy objects
}
experimentName = "string"
identity {
identityType = "string"
// For remaining properties, see IdentityConfiguration objects
}
maxConcurrentTrials = int
maxTotalTrials = int
objective = {
goal = "string"
primaryMetric = "string"
}
priority = int
searchSpace = {}
timeout = "string"
trial = {
codeId = "string"
command = "string"
distribution = {
distributionType = "string"
// For remaining properties, see DistributionConfiguration objects
}
environmentId = "string"
environmentVariables = {
{customized property} = "string"
}
inputDataBindings = {
{customized property} = {
dataId = "string"
mode = "string"
pathOnCompute = "string"
}
}
outputDataBindings = {
{customized property} = {
datastoreId = "string"
mode = "string"
pathOnCompute = "string"
pathOnDatastore = "string"
}
}
timeout = "string"
}
DistributionConfiguration objects
Set the distributionType property to specify the type of object.
For Mpi, use:
distributionType = "Mpi"
processCountPerInstance = int
For PyTorch, use:
distributionType = "PyTorch"
processCount = int
For TensorFlow, use:
distributionType = "TensorFlow"
parameterServerCount = int
workerCount = int
IdentityConfiguration objects
Set the identityType property to specify the type of object.
For AMLToken, use:
identityType = "AMLToken"
For Managed, use:
identityType = "Managed"
clientId = "string"
objectId = "string"
resourceId = "string"
EarlyTerminationPolicy objects
Set the policyType property to specify the type of object.
For Bandit, use:
policyType = "Bandit"
slackAmount = int
slackFactor = int
For MedianStopping, use:
policyType = "MedianStopping"
For TruncationSelection, use:
policyType = "TruncationSelection"
truncationPercentage = int
Property values
workspaces/jobs
Name | Description | Value |
---|---|---|
type | The resource type | "Microsoft.MachineLearningServices/workspaces/jobs@2021-03-01-preview" |
name | The resource name | string (required) |
parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: workspaces |
properties | [Required] Additional attributes of the entity. | JobBase (required) |
JobBase
Name | Description | Value |
---|---|---|
description | The asset description text. | string |
properties | The asset property dictionary. | JobBaseProperties |
tags | Tag dictionary. Tags can be added, removed, and updated. | object |
jobType | Set the object type | Command Sweep (required) |
JobBaseProperties
Name | Description | Value |
---|---|---|
{customized property} | string |
CommandJob
Name | Description | Value |
---|---|---|
jobType | [Required] Specifies the type of job. | "Command" (required) |
codeId | ARM resource ID of the code asset. | string |
command | [Required] The command to execute on startup of the job. eg. "python train.py" | string (required) Constraints: Min length = 1 Pattern = [a-zA-Z0-9_] |
compute | [Required] Compute binding for the job. | ComputeConfiguration (required) |
distribution | Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. | DistributionConfiguration |
environmentId | The ARM resource ID of the Environment specification for the job. | string |
environmentVariables | Environment variables included in the job. | CommandJobEnvironmentVariables |
experimentName | The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. | string |
identity | Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, or null. Defaults to AmlToken if null. |
IdentityConfiguration |
inputDataBindings | Mapping of input data bindings used in the job. | CommandJobInputDataBindings |
outputDataBindings | Mapping of output data bindings used in the job. | CommandJobOutputDataBindings |
priority | Job priority for scheduling policy. Only applies to AMLCompute. Private preview feature and only available to users on the allow list. |
int |
timeout | The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. | string |
ComputeConfiguration
Name | Description | Value |
---|---|---|
instanceCount | Number of instances or nodes. | int |
instanceType | SKU type to run on. | string |
isLocal | Set to true for jobs running on local compute. | bool |
location | Location for virtual cluster run. | string |
properties | Additional properties. | ComputeConfigurationProperties |
target | ARM resource ID of the Compute you are targeting. If not provided the resource will be deployed as Managed. | string |
ComputeConfigurationProperties
Name | Description | Value |
---|---|---|
{customized property} | string |
DistributionConfiguration
Name | Description | Value |
---|---|---|
distributionType | Set the object type | Mpi PyTorch TensorFlow (required) |
Mpi
Name | Description | Value |
---|---|---|
distributionType | [Required] Specifies the type of distribution framework. | "Mpi" (required) |
processCountPerInstance | Number of processes per MPI node. | int |
PyTorch
Name | Description | Value |
---|---|---|
distributionType | [Required] Specifies the type of distribution framework. | "PyTorch" (required) |
processCount | Total process count for the distributed job. | int |
TensorFlow
Name | Description | Value |
---|---|---|
distributionType | [Required] Specifies the type of distribution framework. | "TensorFlow" (required) |
parameterServerCount | Number of parameter server tasks. | int |
workerCount | Number of workers. Overwrites the node count in compute binding. | int |
CommandJobEnvironmentVariables
Name | Description | Value |
---|---|---|
{customized property} | string |
IdentityConfiguration
Name | Description | Value |
---|---|---|
identityType | Set the object type | AMLToken Managed (required) |
AmlToken
Name | Description | Value |
---|---|---|
identityType | [Required] Specifies the type of identity framework. | "AMLToken" (required) |
ManagedIdentity
Name | Description | Value |
---|---|---|
identityType | [Required] Specifies the type of identity framework. | "Managed" (required) |
clientId | Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ |
objectId | Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ |
resourceId | Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. | string |
CommandJobInputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | InputDataBinding |
InputDataBinding
Name | Description | Value |
---|---|---|
dataId | ARM resource ID of the registered dataVersion. | string |
mode | Mechanism for accessing the data artifact. | "Direct" "Download" "EvalDownload" "EvalMount" "Mount" "ReadOnlyMount" "ReadWriteMount" "Upload" |
pathOnCompute | Location of data inside the container process. | string |
CommandJobOutputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | OutputDataBinding |
OutputDataBinding
Name | Description | Value |
---|---|---|
datastoreId | ARM resource ID of the datastore where the data output will be stored. | string |
mode | Mechanism for data movement to datastore. | "Direct" "Download" "EvalDownload" "EvalMount" "Mount" "ReadOnlyMount" "ReadWriteMount" "Upload" |
pathOnCompute | Location of data inside the container process. | string |
pathOnDatastore | Path within the datastore to the data. | string |
SweepJob
Name | Description | Value |
---|---|---|
jobType | [Required] Specifies the type of job. | "Sweep" (required) |
algorithm | [Required] Type of the hyperparameter sampling algorithms | "Bayesian" "Grid" "Random" (required) |
compute | [Required] Compute binding for the job. | ComputeConfiguration (required) |
earlyTermination | Early termination policies enable canceling poor-performing runs before they complete. | EarlyTerminationPolicy |
experimentName | The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. | string |
identity | Identity configuration. If set, this should be one of AmlToken, ManagedIdentity or null. Defaults to AmlToken if null. |
IdentityConfiguration |
maxConcurrentTrials | An upper bound on the number of trials performed in parallel. | int |
maxTotalTrials | An upper bound on the number of trials to perform. | int |
objective | [Required] Optimization objective. | Objective (required) |
priority | Job priority for scheduling policy. Only applies to AMLCompute. Private preview feature and only available to users on the allow list. |
int |
searchSpace | [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter | SweepJobSearchSpace (required) |
timeout | The total timeout in ISO 8601 format. Only supports duration with precision as low as Minutes. | string |
trial | Trial component definition. | TrialComponent |
EarlyTerminationPolicy
Name | Description | Value |
---|---|---|
delayEvaluation | Number of intervals by which to delay the first evaluation. | int |
evaluationInterval | Interval (number of runs) between policy evaluations. | int |
policyType | Set the object type | Bandit MedianStopping TruncationSelection (required) |
BanditPolicy
Name | Description | Value |
---|---|---|
policyType | [Required] Name of policy configuration | "Bandit" (required) |
slackAmount | Absolute distance allowed from the best performing run. | int |
slackFactor | Ratio of the allowed distance from the best performing run. | int |
MedianStoppingPolicy
Name | Description | Value |
---|---|---|
policyType | [Required] Name of policy configuration | "MedianStopping" (required) |
TruncationSelectionPolicy
Name | Description | Value |
---|---|---|
policyType | [Required] Name of policy configuration | "TruncationSelection" (required) |
truncationPercentage | The percentage of runs to cancel at each evaluation interval. | int |
Objective
Name | Description | Value |
---|---|---|
goal | [Required] Defines supported metric goals for hyperparameter tuning | "Maximize" "Minimize" (required) |
primaryMetric | [Required] Name of the metric to optimize. | string (required) Constraints: Pattern = [a-zA-Z0-9_] |
SweepJobSearchSpace
Name | Description | Value |
---|---|---|
{customized property} |
TrialComponent
Name | Description | Value |
---|---|---|
codeId | ARM resource ID of the code asset. | string |
command | [Required] The command to execute on startup of the job. eg. "python train.py" | string (required) Constraints: Min length = 1 Pattern = [a-zA-Z0-9_] |
distribution | Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. | DistributionConfiguration |
environmentId | The ARM resource ID of the Environment specification for the job. | string |
environmentVariables | Environment variables included in the job. | TrialComponentEnvironmentVariables |
inputDataBindings | Mapping of input data bindings used in the job. | TrialComponentInputDataBindings |
outputDataBindings | Mapping of output data bindings used in the job. | TrialComponentOutputDataBindings |
timeout | The max run duration in ISO 8601 format, after which the trial component will be cancelled. Only supports duration with precision as low as Seconds. |
string |
TrialComponentEnvironmentVariables
Name | Description | Value |
---|---|---|
{customized property} | string |
TrialComponentInputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | InputDataBinding |
TrialComponentOutputDataBindings
Name | Description | Value |
---|---|---|
{customized property} | OutputDataBinding |