共用方式為


Microsoft.MachineLearningServices 工作區/作業 2021-03-01-preview

Bicep 資源定義

工作區/作業資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.MachineLearningServices/workspaces/jobs 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.MachineLearningServices/workspaces/jobs@2021-03-01-preview' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    description: 'string'
    properties: {
      {customized property}: 'string'
    }
    tags: {
      {customized property}: 'string'
    }
    jobType: 'string'
    // For remaining properties, see JobBase objects
  }
}

JobBase 物件

設定 jobType 屬性以指定物件的類型。

針對 [命令],請使用:

  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'

針對 掃掠,請使用:

  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 物件

設定 distributionType 屬性以指定物件的類型。

針對 Mpi,請使用:

  distributionType: 'Mpi'
  processCountPerInstance: int

針對 PyTorch,請使用:

  distributionType: 'PyTorch'
  processCount: int

針對 TensorFlow,請使用:

  distributionType: 'TensorFlow'
  parameterServerCount: int
  workerCount: int

IdentityConfiguration 物件

設定 identityType 屬性以指定物件的類型。

針對 AMLToken,請使用:

  identityType: 'AMLToken'

針對 [受控],請使用:

  identityType: 'Managed'
  clientId: 'string'
  objectId: 'string'
  resourceId: 'string'

EarlyTerminationPolicy 物件

設定 policyType 屬性以指定物件的類型。

針對 Bandit,請使用:

  policyType: 'Bandit'
  slackAmount: int
  slackFactor: int

針對 MedianStopping,請使用:

  policyType: 'MedianStopping'

針對 TruncationSelection,請使用:

  policyType: 'TruncationSelection'
  truncationPercentage: int

屬性值

workspaces/jobs

名稱 描述
NAME 資源名稱

瞭解如何在 Bicep 中設定子資源的名稱和類型。
需要字串 ()
父系 (parent) 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增此屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱: 工作區
properties [必要]實體的其他屬性。 JobBase (必要)

JobBase

名稱 描述
description 資產描述文字。 字串
properties 資產屬性字典。 JobBaseProperties
tags 標記字典。 標記可以新增、移除和更新。 物件 (object)
jobType 設定物件類型 命令
需要掃掠 ()

JobBaseProperties

名稱 描述
{自定義屬性} 字串

CommandJob

名稱 描述
jobType [必要]指定作業的類型。 需要 『Command』 ()
codeId 程式代碼資產的 ARM 資源識別碼。 字串
命令 [必要]在作業啟動時執行的命令。 例如 “python train.py” 需要字串 ()

約束:
最小長度 = 1
模式 = [a-zA-Z0-9_]
計算 [必要]作業的計算系結。 需要 ComputeConfiguration ()
散發 (distribution) 作業的散發組態。 如果設定,這應該是 Mpi、Tensorflow、PyTorch 或 null 的其中一個。 DistributionConfiguration
environmentId 作業之環境規格的 ARM 資源識別碼。 字串
environmentVariables 作業中包含的環境變數。 CommandJobEnvironmentVariables
experimentName 作業所屬的實驗名稱。 如果未設定,作業會放在「預設」實驗中。 字串
身分識別 身分識別組態。 如果設定,這應該是其中一個 AmlToken、ManagedIdentity 或 null。
如果為 null,則預設為 AmlToken。
IdentityConfiguration
inputDataBindings 對應作業中使用的輸入數據系結。 CommandJobInputDataBindings
outputDataBindings 對應作業中使用的輸出數據系結。 CommandJobOutputDataBindings
priority 排程原則的作業優先順序。 僅適用於 AMLCompute。
私人預覽功能,僅適用於允許清單上的使用者。
int
timeout ISO 8601 格式的最大執行持續時間,之後作業將會取消。 僅支援有效位數為秒數的持續時間。 字串

ComputeConfiguration

名稱 描述
instanceCount 實例或節點的數目。 int
instanceType 要執行之 SKU 類型。 字串
isLocal 針對在本機計算上執行的作業,設定為 true。 bool
location 虛擬叢集執行的位置。 字串
properties 其他屬性。 ComputeConfigurationProperties
目標 您要鎖定之計算的 ARM 資源識別碼。 如果未提供,資源將會部署為受控。 字串

ComputeConfigurationProperties

名稱 描述
{自定義屬性} 字串

DistributionConfiguration

名稱 描述
distributionType 設定物件類型 Mpi
PyTorch
TensorFlow (必要)

Mpi

名稱 描述
distributionType [必要]指定散發架構的類型。 需要 『Mpi』 ()
processCountPerInstance 每個 MPI 節點的進程數目。 int

PyTorch

名稱 描述
distributionType [必要]指定散發架構的類型。 需要 『PyTorch』 ()
processCount 分散式作業的進程計數總計。 int

TensorFlow

名稱 描述
distributionType [必要]指定散發架構的類型。 必要) 'TensorFlow' (
parameterServerCount 參數伺服器工作的數目。 int
workerCount 背景工作數目。 覆寫計算系結中的節點計數。 int

CommandJobEnvironmentVariables

名稱 描述
{自定義屬性} 字串

IdentityConfiguration

名稱 描述
identityType 設定物件類型 AMLToken
受控 (必要)

AmlToken

名稱 描述
identityType [必要]指定身分識別架構的類型。 必要的 『AMLToken』 ()

ManagedIdentity

名稱 描述
identityType [必要]指定身分識別架構的類型。 「受控」 (必要)
clientId 依用戶端識別元指定使用者指派的身分識別。 針對系統指派,請勿設定此欄位。 字串

約束:
最小長度 = 36
最大長度 = 36
模式 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
objectId 依物件識別元指定使用者指派的身分識別。 針對系統指派,請勿設定此欄位。 字串

約束:
最小長度 = 36
最大長度 = 36
模式 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
resourceId 依 ARM 資源識別碼指定使用者指派的身分識別。 針對系統指派,請勿設定此欄位。 字串

CommandJobInputDataBindings

名稱 描述
{自定義屬性} InputDataBinding

InputDataBinding

名稱 描述
dataId 已註冊 dataVersion 的 ARM 資源識別碼。 字串
mode 存取數據成品的機制。 'Direct'
'Download'
'EvalDownload'
'EvalMount'
'Mount'
'ReadOnlyMount'
'ReadWriteMount'
'Upload'
pathOnCompute 容器進程內數據的位置。 字串

CommandJobOutputDataBindings

名稱 描述
{自定義屬性} OutputDataBinding

OutputDataBinding

名稱 描述
datastoreId 儲存資料輸出之數據存放區的 ARM 資源識別碼。 字串
mode 數據移動至數據存放區的機制。 'Direct'
'Download'
'EvalDownload'
'EvalMount'
'Mount'
'ReadOnlyMount'
'ReadWriteMount'
'Upload'
pathOnCompute 容器進程內數據的位置。 字串
pathOnDatastore 數據存放區內的數據路徑。 字串

SweepJob

名稱 描述
jobType [必要]指定作業的類型。 需要 「掃掠」 ()
演算法 [必要]超參數取樣演算法的類型 'Bayesian'
'Grid'
需要 'Random' ()
計算 [必要]作業的計算系結。 需要 ComputeConfiguration ()
earlyTermination 提早終止原則可在完成之前取消執行效能不佳。 EarlyTerminationPolicy
experimentName 作業所屬的實驗名稱。 如果未設定,作業會放在「預設」實驗中。 字串
身分識別 身分識別組態。 如果設定,這應該是其中一個 AmlToken、ManagedIdentity 或 null。
如果為 null,則預設為 AmlToken。
IdentityConfiguration
maxConcurrentTrials 平行執行的試用版數目上限。 int
maxTotalTrials 要執行的試用版數目上限。 int
objective [必要]優化目標。 必要目標 ()
priority 排程原則的作業優先順序。 僅適用於 AMLCompute。
私人預覽功能,僅適用於允許清單上的使用者。
int
searchSpace [必要]包含每個參數及其分佈的字典。 字典索引鍵是參數的名稱 SweepJobSearchSpace (必要)
timeout ISO 8601 格式的總逾時。 僅支援有效位數為分鐘數的持續時間。 字串
試用版 試用版元件定義。 TrialComponent

EarlyTerminationPolicy

名稱 描述
delayEvaluation 延遲第一次評估的間隔數目。 int
evaluationInterval 原則評估之間) 執行的間隔 (數目。 int
policyType 設定物件類型 Bandit
MedianStopping
截斷選取 必要 ()

BanditPolicy

名稱 描述
policyType [必要]原則設定的名稱 需要 『Bandit』 ()
slackAmount 最佳執行所允許的絕對距離。 int
slackFactor 允許與最佳執行距離的比例。 int

MedianStoppingPolicy

名稱 描述
policyType [必要]原則設定的名稱 必要 ('MedianStopping')

TruncationSelectionPolicy

名稱 描述
policyType [必要]原則設定的名稱 'TruncationSelection' (必要)
truncationPercentage 要在每個評估間隔取消的執行百分比。 int

目標

名稱 描述
goal [必要]定義超參數微調支援的計量目標 '最大化'
必要) 『最小化 (」。
primaryMetric [必要]要優化之計量的名稱。 字串 (必要)

約束:
模式 = [a-zA-Z0-9_]

SweepJobSearchSpace

名稱 描述
{自定義屬性} 針對 Bicep,您可以使用 any () 函式。

TrialComponent

名稱 描述
codeId 程式代碼資產的 ARM 資源識別碼。 字串
命令 [必要]在作業啟動時執行的命令。 例如 “python train.py” 字串 (必要)

約束:
最小長度 = 1
模式 = [a-zA-Z0-9_]
散發 (distribution) 作業的散發組態。 如果設定,這應該是 Mpi、Tensorflow、PyTorch 或 null 的其中一個。 DistributionConfiguration
environmentId 作業環境規格的 ARM 資源識別碼。 字串
environmentVariables 作業中包含的環境變數。 TrialComponentEnvironmentVariables
inputDataBindings 對應作業中使用的輸入數據系結。 TrialComponentInputDataBindings
outputDataBindings 對應作業中使用的輸出數據系結。 TrialComponentOutputDataBindings
timeout ISO 8601 格式的執行持續時間上限,之後將會取消試用元件。
僅支援有效位數為秒數的持續時間。
字串

TrialComponentEnvironmentVariables

名稱 描述
{自定義屬性} 字串

TrialComponentInputDataBindings

名稱 描述
{自定義屬性} InputDataBinding

TrialComponentOutputDataBindings

名稱 描述
{自定義屬性} OutputDataBinding

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
建立 Azure Machine Learning AutoML 分類作業

部署至 Azure
此範本會建立 Azure Machine Learning AutoML 分類作業,以找出預測用戶端是否會向金融機構訂閱固定期存金的最佳模型。
建立 Azure Machine Learning 命令作業

部署至 Azure
此範本會建立具有基本hello_world腳本的 Azure Machine Learning 命令作業
建立 Azure Machine Learning 掃掠作業

部署至 Azure
此範本會建立 Azure Machine Learning 掃掠作業以進行超參數微調。

ARM 範本資源定義

工作區/作業資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.MachineLearningServices/workspaces/jobs 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.MachineLearningServices/workspaces/jobs",
  "apiVersion": "2021-03-01-preview",
  "name": "string",
  "properties": {
    "description": "string",
    "properties": {
      "{customized property}": "string"
    },
    "tags": {
      "{customized property}": "string"
    },
    "jobType": "string"
    // For remaining properties, see JobBase objects
  }
}

JobBase 物件

設定 jobType 屬性以指定物件的類型。

針對 [命令],請使用:

  "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"

針對 掃掠,請使用:

  "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 物件

設定 distributionType 屬性以指定物件的類型。

針對 Mpi,請使用:

  "distributionType": "Mpi",
  "processCountPerInstance": "int"

針對 PyTorch,請使用:

  "distributionType": "PyTorch",
  "processCount": "int"

針對 TensorFlow,請使用:

  "distributionType": "TensorFlow",
  "parameterServerCount": "int",
  "workerCount": "int"

IdentityConfiguration 物件

設定 identityType 屬性以指定物件的類型。

針對 AMLToken,請使用:

  "identityType": "AMLToken"

針對 Managed,請使用:

  "identityType": "Managed",
  "clientId": "string",
  "objectId": "string",
  "resourceId": "string"

EarlyTerminationPolicy 物件

設定 policyType 屬性以指定物件的類型。

針對 Bandit,請使用:

  "policyType": "Bandit",
  "slackAmount": "int",
  "slackFactor": "int"

針對 MedianStopping,請使用:

  "policyType": "MedianStopping"

針對 TruncationSelection,請使用:

  "policyType": "TruncationSelection",
  "truncationPercentage": "int"

屬性值

workspaces/jobs

名稱 描述
類型 資源類型 'Microsoft.MachineLearningServices/workspaces/jobs'
apiVersion 資源 API 版本 '2021-03-01-preview'
NAME 資源名稱

請參閱如何在 JSON ARM 樣本中設定子資源的名稱和類型。
字串 (必要)
properties [必要]實體的其他屬性。 JobBase (必要)

JobBase

名稱 描述
description 資產描述文字。 字串
properties 資產屬性字典。 JobBaseProperties
tags 標記字典。 標記可以新增、移除和更新。 物件 (object)
jobType 設定物件類型 命令
需要掃掠 ()

JobBaseProperties

名稱 描述
{自定義屬性} 字串

CommandJob

名稱 描述
jobType [必要]指定作業的類型。 'Command' (必要)
codeId 程式代碼資產的 ARM 資源識別碼。 字串
命令 [必要]在作業啟動時執行的命令。 例如 “python train.py” 字串 (必要)

約束:
最小長度 = 1
模式 = [a-zA-Z0-9_]
計算 [必要]作業的計算系結。 需要 ComputeConfiguration ()
散發 (distribution) 作業的散發組態。 如果設定,這應該是 Mpi、Tensorflow、PyTorch 或 null 的其中一個。 DistributionConfiguration
environmentId 作業環境規格的 ARM 資源識別碼。 字串
environmentVariables 作業中包含的環境變數。 CommandJobEnvironmentVariables
experimentName 作業所屬的實驗名稱。 如果未設定,作業會放在「預設」實驗中。 字串
身分識別 身分識別設定。 如果設定,這應該是 AmlToken、ManagedIdentity 或 null 的其中一個。
如果為 null,則預設為 AmlToken。
IdentityConfiguration
inputDataBindings 對應作業中使用的輸入數據系結。 CommandJobInputDataBindings
outputDataBindings 對應作業中使用的輸出數據系結。 CommandJobOutputDataBindings
priority 排程原則的作業優先順序。 僅適用於 AMLCompute。
私人預覽功能,僅適用於允許清單上的使用者。
int
timeout ISO 8601 格式的最大執行持續時間,之後作業將會取消。 僅支援有效位數為秒數的持續時間。 字串

ComputeConfiguration

名稱 描述
instanceCount 實例或節點的數目。 int
instanceType 要執行之 SKU 類型。 字串
isLocal 針對在本機計算上執行的作業,設定為 true。 bool
location 虛擬叢集執行的位置。 字串
properties 其他屬性。 ComputeConfigurationProperties
目標 您要鎖定之計算的 ARM 資源識別碼。 如果未提供,資源將會部署為受控。 字串

ComputeConfigurationProperties

名稱 描述
{自定義屬性} 字串

DistributionConfiguration

名稱 描述
distributionType 設定物件類型 Mpi
PyTorch
TensorFlow (必要)

Mpi

名稱 描述
distributionType [必要]指定散發架構的類型。 需要 『Mpi』 ()
processCountPerInstance 每個 MPI 節點的進程數目。 int

PyTorch

名稱 描述
distributionType [必要]指定散發架構的類型。 需要 『PyTorch』 ()
processCount 分散式作業的進程計數總計。 int

TensorFlow

名稱 描述
distributionType [必要]指定散發架構的類型。 需要 『TensorFlow』 ()
parameterServerCount 參數伺服器工作的數目。 int
workerCount 背景工作數目。 覆寫計算系結中的節點計數。 int

CommandJobEnvironmentVariables

名稱 描述
{自定義屬性} 字串

IdentityConfiguration

名稱 描述
identityType 設定物件類型 AMLToken
受控 (必要)

AmlToken

名稱 描述
identityType [必要]指定身分識別架構的類型。 需要 『AMLToken』 ()

ManagedIdentity

名稱 描述
identityType [必要]指定身分識別架構的類型。 必要) 'Managed' (
clientId 依用戶端識別元指定使用者指派的身分識別。 若為系統指派,請勿設定此欄位。 字串

約束:
最小長度 = 36
最大長度 = 36
模式 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
objectId 依物件識別元指定使用者指派的身分識別。 若為系統指派,請勿設定此欄位。 字串

約束:
最小長度 = 36
最大長度 = 36
模式 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
resourceId 依 ARM 資源識別碼指定使用者指派的身分識別。 若為系統指派,請勿設定此欄位。 字串

CommandJobInputDataBindings

名稱 描述
{自定義屬性} InputDataBinding

InputDataBinding

名稱 描述
dataId 已註冊 dataVersion 的 ARM 資源識別碼。 字串
mode 存取數據成品的機制。 'Direct'
'Download'
'EvalDownload'
'EvalMount'
'Mount'
'ReadOnlyMount'
'ReadWriteMount'
'Upload'
pathOnCompute 容器進程內數據的位置。 字串

CommandJobOutputDataBindings

名稱 描述
{自定義屬性} OutputDataBinding

OutputDataBinding

名稱 描述
datastoreId 數據輸出將儲存之數據存放區的 ARM 資源識別碼。 字串
mode 數據移至數據存放區的機制。 'Direct'
'Download'
'EvalDownload'
'EvalMount'
'Mount'
'ReadOnlyMount'
'ReadWriteMount'
'Upload'
pathOnCompute 容器進程內數據的位置。 字串
pathOnDatastore 數據存放區內的數據路徑。 字串

SweepJob

名稱 描述
jobType [必要]指定作業的類型。 需要 「掃掠」 ()
演算法 [必要]超參數取樣演算法的類型 'Bayesian'
'Grid'
需要 'Random' ()
計算 [必要]作業的計算系結。 需要 ComputeConfiguration ()
earlyTermination 提早終止原則可在完成之前取消執行效能不佳。 EarlyTerminationPolicy
experimentName 作業所屬的實驗名稱。 如果未設定,作業會放在「預設」實驗中。 字串
身分識別 身分識別組態。 如果設定,這應該是其中一個 AmlToken、ManagedIdentity 或 null。
如果為 null,則預設為 AmlToken。
IdentityConfiguration
maxConcurrentTrials 平行執行的試用版數目上限。 int
maxTotalTrials 要執行的試用版數目上限。 int
objective [必要]優化目標。 必要目標 ()
priority 排程原則的作業優先順序。 僅適用於 AMLCompute。
私人預覽功能,僅適用於允許清單上的使用者。
int
searchSpace [必要]包含每個參數及其分佈的字典。 字典索引鍵是參數的名稱 SweepJobSearchSpace (必要)
timeout ISO 8601 格式的總逾時。 僅支援有效位數為分鐘數的持續時間。 字串
試用版 試用版元件定義。 TrialComponent

EarlyTerminationPolicy

名稱 描述
delayEvaluation 延遲第一次評估的間隔數目。 int
evaluationInterval 原則評估之間) 執行的間隔 (數目。 int
policyType 設定物件類型 Bandit
MedianStopping
截斷選取 必要 ()

BanditPolicy

名稱 描述
policyType [必要]原則設定的名稱 需要 『Bandit』 ()
slackAmount 最佳執行所允許的絕對距離。 int
slackFactor 允許與最佳執行距離的比例。 int

MedianStoppingPolicy

名稱 描述
policyType [必要]原則設定的名稱 必要 ('MedianStopping')

TruncationSelectionPolicy

名稱 描述
policyType [必要]原則設定的名稱 'TruncationSelection' (必要)
truncationPercentage 要在每個評估間隔取消的執行百分比。 int

目標

名稱 描述
goal [必要]定義超參數微調支援的計量目標 '最大化'
需要 「最小化」 ()
primaryMetric [必要]要優化的計量名稱。 需要字串 ()

約束:
模式 = [a-zA-Z0-9_]

SweepJobSearchSpace

名稱 描述
{自定義屬性}

TrialComponent

名稱 描述
codeId 程式代碼資產的 ARM 資源識別碼。 字串
命令 [必要]在作業啟動時執行的命令。 例如 “python train.py” 字串 (必要)

約束:
最小長度 = 1
模式 = [a-zA-Z0-9_]
散發 (distribution) 作業的散發組態。 如果設定,這應該是 Mpi、Tensorflow、PyTorch 或 null 的其中一個。 DistributionConfiguration
environmentId 作業環境規格的 ARM 資源識別碼。 字串
environmentVariables 作業中包含的環境變數。 TrialComponentEnvironmentVariables
inputDataBindings 對應作業中使用的輸入數據系結。 TrialComponentInputDataBindings
outputDataBindings 對應作業中使用的輸出數據系結。 TrialComponentOutputDataBindings
timeout ISO 8601 格式的執行持續時間上限,之後將會取消試用元件。
僅支援有效位數為秒數的持續時間。
字串

TrialComponentEnvironmentVariables

名稱 描述
{自定義屬性} 字串

TrialComponentInputDataBindings

名稱 描述
{自定義屬性} InputDataBinding

TrialComponentOutputDataBindings

名稱 描述
{自定義屬性} OutputDataBinding

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
建立 Azure Machine Learning AutoML 分類作業

部署至 Azure
此範本會建立 Azure Machine Learning AutoML 分類作業,以找出預測用戶端是否會向金融機構訂閱固定期存金的最佳模型。
建立 Azure Machine Learning 命令作業

部署至 Azure
此範本會建立具有基本hello_world腳本的 Azure Machine Learning 命令作業
建立 Azure Machine Learning 掃掠作業

部署至 Azure
此範本會建立 Azure Machine Learning 掃掠作業以進行超參數微調。

Terraform (AzAPI 提供者) 資源定義

工作區/作業資源類型可以使用目標作業來部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.MachineLearningServices/workspaces/jobs 資源,請將下列 Terraform 新增至您的範本。

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 = {
        {customized property} = "string"
      }
      jobType = "string"
      // For remaining properties, see JobBase objects
    }
  })
}

JobBase 物件

設定 jobType 屬性以指定物件的類型。

針對 [命令],請使用:

  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"

針對 掃掠,請使用:

  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 物件

設定 distributionType 屬性以指定物件的類型。

針對 Mpi,請使用:

  distributionType = "Mpi"
  processCountPerInstance = int

針對 PyTorch,請使用:

  distributionType = "PyTorch"
  processCount = int

針對 TensorFlow,請使用:

  distributionType = "TensorFlow"
  parameterServerCount = int
  workerCount = int

IdentityConfiguration 物件

設定 identityType 屬性以指定物件的類型。

針對 AMLToken,請使用:

  identityType = "AMLToken"

針對 Managed,請使用:

  identityType = "Managed"
  clientId = "string"
  objectId = "string"
  resourceId = "string"

EarlyTerminationPolicy 物件

設定 policyType 屬性以指定物件的類型。

針對 Bandit,請使用:

  policyType = "Bandit"
  slackAmount = int
  slackFactor = int

針對 MedianStopping,請使用:

  policyType = "MedianStopping"

針對 TruncationSelection,請使用:

  policyType = "TruncationSelection"
  truncationPercentage = int

屬性值

workspaces/jobs

名稱 描述
類型 資源類型 “Microsoft.MachineLearningServices/workspaces/jobs@2021-03-01-preview”
NAME 資源名稱 需要字串 ()
parent_id 此資源父系之資源的標識碼。 類型資源的標識碼: 工作區
properties [必要]實體的其他屬性。 JobBase (必要)

JobBase

名稱 描述
description 資產描述文字。 字串
properties 資產屬性字典。 JobBaseProperties
tags 標記字典。 標記可以新增、移除和更新。 物件 (object)
jobType 設定物件類型 命令
需要掃掠 ()

JobBaseProperties

名稱 描述
{自定義屬性} 字串

CommandJob

名稱 描述
jobType [必要]指定作業的類型。 “Command” (必要)
codeId 程式代碼資產的 ARM 資源識別碼。 字串
命令 [必要]在作業啟動時執行的命令。 例如 “python train.py” 需要字串 ()

約束:
最小長度 = 1
模式 = [a-zA-Z0-9_]
計算 [必要]作業的計算系結。 需要 ComputeConfiguration ()
散發 (distribution) 作業的散發組態。 如果設定,這應該是 Mpi、Tensorflow、PyTorch 或 null 的其中一個。 DistributionConfiguration
environmentId 作業之環境規格的 ARM 資源識別碼。 字串
environmentVariables 作業中包含的環境變數。 CommandJobEnvironmentVariables
experimentName 作業所屬的實驗名稱。 如果未設定,作業會放在「預設」實驗中。 字串
身分識別 身分識別組態。 如果設定,這應該是其中一個 AmlToken、ManagedIdentity 或 null。
如果為 null,則預設為 AmlToken。
IdentityConfiguration
inputDataBindings 對應作業中使用的輸入數據系結。 CommandJobInputDataBindings
outputDataBindings 對應作業中使用的輸出數據系結。 CommandJobOutputDataBindings
priority 排程原則的作業優先順序。 僅適用於 AMLCompute。
私人預覽功能,僅適用於允許清單上的使用者。
int
timeout ISO 8601 格式的最大執行持續時間,之後作業將會取消。 僅支援有效位數為秒數的持續時間。 字串

ComputeConfiguration

名稱 描述
instanceCount 實例或節點的數目。 int
instanceType 要執行之 SKU 類型。 字串
isLocal 針對在本機計算上執行的作業,設定為 true。 bool
location 虛擬叢集執行的位置。 字串
properties 其他屬性。 ComputeConfigurationProperties
目標 您要鎖定之計算的 ARM 資源識別碼。 如果未提供,資源將會部署為受控。 字串

ComputeConfigurationProperties

名稱 描述
{自定義屬性} 字串

DistributionConfiguration

名稱 描述
distributionType 設定物件類型 Mpi
PyTorch
TensorFlow (必要)

Mpi

名稱 描述
distributionType [必要]指定散發架構的類型。 “Mpi” (必要)
processCountPerInstance 每個 MPI 節點的進程數目。 int

PyTorch

名稱 描述
distributionType [必要]指定散發架構的類型。 “PyTorch” (必要)
processCount 分散式作業的進程計數總計。 int

TensorFlow

名稱 描述
distributionType [必要]指定散發架構的類型。 必要) 「TensorFlow」 (
parameterServerCount 參數伺服器工作的數目。 int
workerCount 背景工作數目。 覆寫計算系結中的節點計數。 int

CommandJobEnvironmentVariables

名稱 描述
{自定義屬性} 字串

IdentityConfiguration

名稱 描述
identityType 設定物件類型 AMLToken
受控 (必要)

AmlToken

名稱 描述
identityType [必要]指定身分識別架構的類型。 “AMLToken” (必要)

ManagedIdentity

名稱 描述
identityType [必要]指定身分識別架構的類型。 「受控」 (必要)
clientId 依用戶端識別元指定使用者指派的身分識別。 針對系統指派,請勿設定此欄位。 字串

約束:
最小長度 = 36
最大長度 = 36
模式 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
objectId 依物件識別元指定使用者指派的身分識別。 若為系統指派,請勿設定此欄位。 字串

約束:
最小長度 = 36
最大長度 = 36
模式 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
resourceId 依 ARM 資源識別碼指定使用者指派的身分識別。 若為系統指派,請勿設定此欄位。 字串

CommandJobInputDataBindings

名稱 描述
{自定義屬性} InputDataBinding

InputDataBinding

名稱 描述
dataId 已註冊 dataVersion 的 ARM 資源識別碼。 字串
mode 存取數據成品的機制。 “Direct”
“下載”
“EvalDownload”
“EvalMount”
“Mount”
“ReadOnlyMount”
“ReadWriteMount”
“上傳”
pathOnCompute 容器進程內數據的位置。 字串

CommandJobOutputDataBindings

名稱 描述
{自定義屬性} OutputDataBinding

OutputDataBinding

名稱 描述
datastoreId 數據輸出將儲存之數據存放區的 ARM 資源識別碼。 字串
mode 數據移至數據存放區的機制。 “Direct”
“下載”
“EvalDownload”
“EvalMount”
“Mount”
“ReadOnlyMount”
“ReadWriteMount”
“上傳”
pathOnCompute 容器進程內數據的位置。 字串
pathOnDatastore 數據存放區內的數據路徑。 字串

SweepJob

名稱 描述
jobType [必要]指定作業的類型。 「掃掠」 (必要)
演算法 [必要]超參數取樣演算法的類型 “Bayesian”
“Grid”
“Random” (必要)
計算 [必要]作業的計算系結。 需要 ComputeConfiguration ()
earlyTermination 提早終止原則可在完成之前取消執行效能不佳。 EarlyTerminationPolicy
experimentName 作業所屬的實驗名稱。 如果未設定,作業會放在「預設」實驗中。 字串
身分識別 身分識別組態。 如果設定,這應該是其中一個 AmlToken、ManagedIdentity 或 null。
如果為 null,則預設為 AmlToken。
IdentityConfiguration
maxConcurrentTrials 平行執行的試用版數目上限。 int
maxTotalTrials 要執行的試用版數目上限。 int
objective [必要]優化目標。 必要目標 ()
priority 排程原則的作業優先順序。 僅適用於 AMLCompute。
私人預覽功能,僅適用於允許清單上的使用者。
int
searchSpace [必要]包含每個參數及其分佈的字典。 字典索引鍵是參數的名稱 SweepJobSearchSpace (必要)
timeout ISO 8601 格式的總逾時。 僅支援有效位數為分鐘數的持續時間。 字串
試用版 試用版元件定義。 TrialComponent

EarlyTerminationPolicy

名稱 描述
delayEvaluation 延遲第一次評估的間隔數目。 int
evaluationInterval 原則評估之間) 執行的間隔 (數目。 int
policyType 設定物件類型 Bandit
MedianStopping
截斷選取 必要 ()

BanditPolicy

名稱 描述
policyType [必要]原則設定的名稱 “Bandit” (必要)
slackAmount 最佳執行所允許的絕對距離。 int
slackFactor 允許與最佳執行距離的比例。 int

MedianStoppingPolicy

名稱 描述
policyType [必要]原則設定的名稱 “MedianStopping” (必要)

TruncationSelectionPolicy

名稱 描述
policyType [必要]原則設定的名稱 “TruncationSelection” (必要)
truncationPercentage 要在每個評估間隔取消的執行百分比。 int

目標

名稱 描述
goal [必要]定義超參數微調支援的計量目標 “最大化”
必要) 「最小化」 (
primaryMetric [必要]要優化的計量名稱。 需要字串 ()

約束:
模式 = [a-zA-Z0-9_]

SweepJobSearchSpace

名稱 描述
{自定義屬性}

TrialComponent

名稱 描述
codeId 程式代碼資產的 ARM 資源識別碼。 字串
命令 [必要]在作業啟動時執行的命令。 例如 “python train.py” 需要字串 ()

約束:
最小長度 = 1
模式 = [a-zA-Z0-9_]
散發 (distribution) 作業的散發組態。 如果設定,這應該是 Mpi、Tensorflow、PyTorch 或 null 的其中一個。 DistributionConfiguration
environmentId 作業之環境規格的 ARM 資源識別碼。 字串
environmentVariables 作業中包含的環境變數。 TrialComponentEnvironmentVariables
inputDataBindings 對應作業中使用的輸入數據系結。 TrialComponentInputDataBindings
outputDataBindings 對應作業中使用的輸出數據系結。 TrialComponentOutputDataBindings
timeout ISO 8601 格式的運行時間上限,之後將會取消試用元件。
僅支援有效位數為秒數的持續時間。
字串

TrialComponentEnvironmentVariables

名稱 描述
{自定義屬性} 字串

TrialComponentInputDataBindings

名稱 描述
{自定義屬性} InputDataBinding

TrialComponentOutputDataBindings

名稱 描述
{自定義屬性} OutputDataBinding