Microsoft.MachineLearningServices 工作區/服務 2021-01-01

Bicep 資源定義

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

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

資源格式

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

resource symbolicname 'Microsoft.MachineLearningServices/workspaces/services@2021-01-01' = {
  name: 'string'
  location: 'string'
  parent: resourceSymbolicName
  description: 'string'
  environmentImageRequest: {
    assets: [
      {
        id: 'string'
        mimeType: 'string'
        unpack: bool
        url: 'string'
      }
    ]
    driverProgram: 'string'
    environment: {
      docker: {
        baseDockerfile: 'string'
        baseImage: 'string'
        baseImageRegistry: {
          address: 'string'
          password: 'string'
          username: 'string'
        }
      }
      environmentVariables: {
        {customized property}: 'string'
      }
      inferencingStackVersion: 'string'
      name: 'string'
      python: {
        baseCondaEnvironment: 'string'
        condaDependencies: any()
        interpreterPath: 'string'
        userManagedDependencies: bool
      }
      r: {
        bioConductorPackages: [
          'string'
        ]
        cranPackages: [
          {
            name: 'string'
            repository: 'string'
          }
        ]
        customUrlPackages: [
          'string'
        ]
        gitHubPackages: [
          {
            authToken: 'string'
            repository: 'string'
          }
        ]
        rscriptPath: 'string'
        rVersion: 'string'
        snapshotDate: 'string'
        userManaged: bool
      }
      spark: {
        packages: [
          {
            artifact: 'string'
            group: 'string'
            version: 'string'
          }
        ]
        precachePackages: bool
        repositories: [
          'string'
        ]
      }
      version: 'string'
    }
    environmentReference: {
      name: 'string'
      version: 'string'
    }
    modelIds: [
      'string'
    ]
    models: [
      {
        createdTime: 'string'
        datasets: [
          {
            id: 'string'
            name: 'string'
          }
        ]
        derivedModelIds: [
          'string'
        ]
        description: 'string'
        experimentName: 'string'
        framework: 'string'
        frameworkVersion: 'string'
        id: 'string'
        kvTags: {
          {customized property}: 'string'
        }
        mimeType: 'string'
        modifiedTime: 'string'
        name: 'string'
        parentModelId: 'string'
        properties: {
          {customized property}: 'string'
        }
        resourceRequirements: {
          cpu: int
          cpuLimit: int
          fpga: int
          gpu: int
          memoryInGB: int
          memoryInGBLimit: int
        }
        runId: 'string'
        sampleInputData: 'string'
        sampleOutputData: 'string'
        unpack: bool
        url: 'string'
        version: int
      }
    ]
  }
  keys: {
    primaryKey: 'string'
    secondaryKey: 'string'
  }
  kvTags: {
    {customized property}: 'string'
  }
  properties: {
    {customized property}: 'string'
  }
  computeType: 'string'
  // For remaining properties, see workspaces/services objects
}

workspaces/services objects

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

針對 ACI,請使用:

  computeType: 'ACI'
  appInsightsEnabled: bool
  authEnabled: bool
  cname: 'string'
  containerResourceRequirements: {
    cpu: int
    cpuLimit: int
    fpga: int
    gpu: int
    memoryInGB: int
    memoryInGBLimit: int
  }
  dataCollection: {
    eventHubEnabled: bool
    storageEnabled: bool
  }
  dnsNameLabel: 'string'
  encryptionProperties: {
    keyName: 'string'
    keyVersion: 'string'
    vaultBaseUrl: 'string'
  }
  sslCertificate: 'string'
  sslEnabled: bool
  sslKey: 'string'
  vnetConfiguration: {
    subnetName: 'string'
    vnetName: 'string'
  }

針對 AKS,請使用:

  computeType: 'AKS'
  aadAuthEnabled: bool
  appInsightsEnabled: bool
  authEnabled: bool
  autoScaler: {
    autoscaleEnabled: bool
    maxReplicas: int
    minReplicas: int
    refreshPeriodInSeconds: int
    targetUtilization: int
  }
  computeName: 'string'
  containerResourceRequirements: {
    cpu: int
    cpuLimit: int
    fpga: int
    gpu: int
    memoryInGB: int
    memoryInGBLimit: int
  }
  dataCollection: {
    eventHubEnabled: bool
    storageEnabled: bool
  }
  isDefault: bool
  livenessProbeRequirements: {
    failureThreshold: int
    initialDelaySeconds: int
    periodSeconds: int
    successThreshold: int
    timeoutSeconds: int
  }
  maxConcurrentRequestsPerContainer: int
  maxQueueWaitMs: int
  namespace: 'string'
  numReplicas: int
  scoringTimeoutMs: int
  trafficPercentile: int
  type: 'string'

屬性值

workspaces/services

名稱 描述
NAME 資源名稱

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

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱: 工作區
description 服務的描述。 字串
environmentImageRequest 推斷所需的環境、模型和資產。 CreateServiceRequestEnvironmentImageRequest
金鑰 驗證金鑰。 CreateServiceRequestKeys
kvTags 服務標籤字典。 標籤是可變動的。 CreateServiceRequestKvTags
properties 服務屬性字典。 屬性是不可變的。 CreateServiceRequestProperties
computeType 設定物件類型 ACI
需要 AKS ()

ACIServiceCreateRequest

名稱 描述
computeType 服務的計算環境類型。 需要 『ACI』 ()
appInsightsEnabled 是否啟用 Application Insights。 bool
authEnabled 服務上是否啟用驗證。 bool
cname 服務的 CName。 字串
containerResourceRequirements 容器資源需求。 ContainerResourceRequirements
dataCollection 指定之數據收集選項的詳細數據。 ACIServiceCreateRequestDataCollection
dnsNameLabel 服務的 Dns 標籤。 字串
encryptionProperties 加密屬性。 ACIServiceCreateRequestEncryptionProperties
sslCertificate 如果已啟用 SSL,則為 PEM 格式的公用 SSL 憑證。 字串
sslEnabled 是否啟用 SSL。 bool
sslKey 憑證的 PEM 格式公開 SSL 金鑰。 字串
vnetConfiguration 虛擬網路組態。 ACIServiceCreateRequestVnetConfiguration

ContainerResourceRequirements

名稱 描述
cpu 容器要使用的 CPU 核心數量下限。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int
cpuLimit 容器允許使用的 CPU 核心數量上限。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int
Fpga 公開給容器的 FPGA PCIE 裝置數目。 必須是 2 的倍數。 int
gpu 容器中的 GPU 核心數目。 int
memoryInGB 容器要使用的最小記憶體 () 。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int
memoryInGBLimit 容器允許使用的記憶體 (上限,以 GB) 為單位。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int

ACIServiceCreateRequestDataCollection

名稱 描述
eventHubEnabled 啟用/停用事件中樞的選項。 bool
storageEnabled 啟用/停用記憶體的選項。 bool

ACIServiceCreateRequestEncryptionProperties

名稱 描述
keyName 加密金鑰名稱 需要字串 ()
keyVersion 加密金鑰版本 需要字串 ()
vaultBaseUrl 保存庫基底 URL 需要字串 ()

ACIServiceCreateRequestVnetConfiguration

名稱 描述
subnetName 虛擬網路子網的名稱。 字串
vnetName 虛擬網路的名稱。 字串

AKSServiceCreateRequest

名稱 描述
computeType 服務的計算環境類型。 'AKS' (必要)
aadAuthEnabled 是否啟用 AAD 驗證。 bool
appInsightsEnabled 是否啟用 Application Insights。 bool
authEnabled 是否啟用驗證。 bool
autoScaler 自動調整程序屬性。 AKSServiceCreateRequestAutoScaler
computeName 計算資源的名稱。 字串
containerResourceRequirements 容器資源需求。 ContainerResourceRequirements
dataCollection 指定之數據收集選項的詳細數據。 AKSServiceCreateRequestDataCollection
isDefault 這是預設的變體。 bool
livenessProbeRequirements 活躍度探查需求。 AKSServiceCreateRequestLivenessProbeRequirements
maxConcurrentRequestsPerContainer 每個容器的並行要求數目上限。 int
maxQueueWaitMs 要求在佇列中等候的時間上限, (毫秒) 。 在這段時間之後,服務會傳回 503 (服務無法使用) int
命名空間 服務的 Kubernetes 命名空間。 字串
numReplicas 叢集上的複本數目。 int
scoringTimeoutMs 評分逾時 (以毫秒為單位)。 int
trafficPercentile 流量變化接收的數量。 int
類型 變體的類型。 'Control'
'Treatment'

AKSServiceCreateRequestAutoScaler

名稱 描述
autoscaleEnabled 啟用/停用自動調整的選項。 bool
maxReplicas 叢集中的複本數目上限。 int
minReplicas 要相應減少的複本數目下限。 int
refreshPeriodInSeconds 自動調整更新之間等候的秒數。 int
targetUtilization 用來判斷是否調整叢集的目標使用率百分比。 int

AKSServiceCreateRequestDataCollection

名稱 描述
eventHubEnabled 啟用/停用事件中樞的選項。 bool
storageEnabled 啟用/停用記憶體的選項。 bool

AKSServiceCreateRequestLivenessProbeRequirements

名稱 描述
failureThreshold 傳回狀況不良狀態之前允許的失敗次數。 int
initialDelaySeconds 第一次探查之前的延遲,以秒為單位。 int
periodSeconds 探查之間的時間長度,以秒為單位。 int
successThreshold 傳回狀況良好狀態之前成功的探查數目。 int
timeoutSeconds 探查逾時,以秒為單位。 int

CreateServiceRequestEnvironmentImageRequest

名稱 描述
資產 資產清單。 ImageAsset[]
driverProgram 驅動程式檔案的名稱。 字串
Environment AZURE ML 環境的詳細數據。 EnvironmentImageRequestEnvironment
environmentReference AZURE ML 環境的唯一識別詳細數據。 EnvironmentImageRequestEnvironmentReference
modelIds 模型標識碼的清單。 string[]
模型 模型清單。 Model[]

ImageAsset

名稱 描述
id 資產標識碼。 字串
mimeType mime 類型。 字串
unpack 資產是否已解壓縮。 bool
url 資產的 URL。 字串

EnvironmentImageRequestEnvironment

名稱 描述
docker Docker 容器的定義。 ModelEnvironmentDefinitionDocker
environmentVariables 要定義於環境中之環境變數的定義。 ModelEnvironmentDefinitionEnvironmentVariables
inferencingStackVersion 已新增至映像的推斷堆疊版本。 若要避免新增推斷堆疊,請勿設定此值。 有效值:「latest」。 字串
NAME 環境的名稱。 字串
Python Python 環境的設定。 ModelEnvironmentDefinitionPython
r R 環境的設定。 ModelEnvironmentDefinitionR
Spark Spark 環境的組態。 ModelEnvironmentDefinitionSpark
version 環境版本。 字串

ModelEnvironmentDefinitionDocker

名稱 描述
baseDockerfile 用於 Docker 型執行的基底 Dockerfile。 與BaseImage互斥。 字串
baseImage 用於 Docker 型執行的基底映像。 與BaseDockerfile互斥。 字串
baseImageRegistry 包含基底映像的映像登錄。 ModelDockerSectionBaseImageRegistry

ModelDockerSectionBaseImageRegistry

名稱 描述
address 字串
密碼 字串

約束:
敏感性值。 以安全參數的形式傳入。
username 字串

約束:
敏感性值。 以安全參數的形式傳入。

ModelEnvironmentDefinitionEnvironmentVariables

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

ModelEnvironmentDefinitionPython

名稱 描述
baseCondaEnvironment 字串
condaDependencies 包含 Conda 相依性的 JObject。 針對 Bicep,您可以使用 any () 函式。
interpreterPath 如果不需要環境建置,要使用的 Python 解釋器路徑。 指定的路徑會用來呼叫使用者腳本。 字串
userManagedDependencies True 表示 AzureML 會重複使用現有的 Python 環境;False 表示 AzureML 會根據 Conda 相依性規格建立 Python 環境。 bool

ModelEnvironmentDefinitionR

名稱 描述
bioConductorPackages 來自Bioconductor 的套件。 string[]
cranPackages 要使用的CRAN套件。 RCranPackage[]
customUrlPackages 來自自訂 URL 的套件。 string[]
gitHubPackages 直接從 GitHub 封裝。 RGitHubPackage[]
rscriptPath 如果不需要環境組建,要使用的 Rscript 路徑。
指定的路徑會用來呼叫使用者腳本。
字串
rVersion 要安裝的 R 版本 字串
snapshotDate 要用於YYYY-MM-DD格式的 MRAN 快照集日期,例如 “2019-04-17” 字串
userManaged 指出環境是由使用者或 AzureML 管理。 bool

RCranPackage

名稱 描述
NAME 封裝名稱。 字串
repository 存放庫名稱。 字串

RGitHubPackage

名稱 描述
authToken 從私人存放庫安裝的個人存取令牌 字串

約束:
敏感性值。 以安全參數的形式傳入。
repository 格式為 username/repo[/subdir][@ref,#pull] 的存放庫位址。 字串

ModelEnvironmentDefinitionSpark

名稱 描述
套件 要使用的Spark套件。 SparkMavenPackage[]
precachePackages 是否要預先擷取套件。 bool
存放庫 Spark 存放庫的清單。 string[]

SparkMavenPackage

名稱 描述
成品 字串
群組 字串
version 字串

EnvironmentImageRequestEnvironmentReference

名稱 描述
NAME 環境的名稱。 字串
version 環境的版本。 字串

型號

名稱 描述
createdTime 模型建立時間 (UTC) 。 字串
datasets 與模型相關聯的數據集清單。 DatasetReference[]
derivedModelIds 衍生自此模型的模型 string[]
description 模型描述文字。 字串
experimentName 建立此模型之實驗的名稱。 字串
架構 模型架構。 字串
frameworkVersion 模型架構版本。 字串
id 模型標識碼。 字串
kvTags 模型標籤字典。 項目可變動。 ModelKvTags
mimeType 模型內容的 MIME 類型。 如需MIME類型的詳細資訊,請開啟 https://www.iana.org/assignments/media-types/media-types.xhtml 需要字串 ()
modifiedTime 模型上次修改時間 (UTC) 。 字串
NAME 模型名稱。 需要字串 ()
parentModelId 父模型標識碼。 字串
properties Model 屬性字典。 屬性是不可變的。 ModelProperties
resourceRequirements 模型的資源需求 ContainerResourceRequirements
runId 建立此模型的 RunId。 字串
sampleInputData 模型的範例輸入數據。 工作區中數據集的參考,格式為 aml://dataset/{datasetId} 字串
sampleOutputData 模型的範例輸出數據。 工作區中數據集的參考,格式為 aml://dataset/{datasetId} 字串
unpack 指出我們是否需要在 Docker 映像建立期間將模型解壓縮。 bool
url 模型的 URL。 通常是SAS URL。 需要字串 ()
version 模型管理服務指派的模型版本。 int

DatasetReference

名稱 描述
id 數據集參考的標識碼。 字串
NAME 數據集參考的名稱。 字串

ModelKvTags

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

ModelProperties

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

CreateServiceRequestKeys

名稱 描述
primaryKey 主鍵。 字串
secondaryKey 次要金鑰。 字串

CreateServiceRequestKvTags

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

CreateServiceRequestProperties

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

快速入門範本

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

範本 描述
建立 Azure Machine Learning 服務

部署至 Azure
此範本會建立 Azure Machine Learning 服務。
(AKS) 建立 Azure Machine Learning 服務

部署至 Azure
此範本會建立 Azure Machine Learning 服務。

ARM 範本資源定義

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

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

資源格式

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

{
  "type": "Microsoft.MachineLearningServices/workspaces/services",
  "apiVersion": "2021-01-01",
  "name": "string",
  "location": "string",
  "description": "string",
  "environmentImageRequest": {
    "assets": [
      {
        "id": "string",
        "mimeType": "string",
        "unpack": "bool",
        "url": "string"
      }
    ],
    "driverProgram": "string",
    "environment": {
      "docker": {
        "baseDockerfile": "string",
        "baseImage": "string",
        "baseImageRegistry": {
          "address": "string",
          "password": "string",
          "username": "string"
        }
      },
      "environmentVariables": {
        "{customized property}": "string"
      },
      "inferencingStackVersion": "string",
      "name": "string",
      "python": {
        "baseCondaEnvironment": "string",
        "condaDependencies": {},
        "interpreterPath": "string",
        "userManagedDependencies": "bool"
      },
      "r": {
        "bioConductorPackages": [ "string" ],
        "cranPackages": [
          {
            "name": "string",
            "repository": "string"
          }
        ],
        "customUrlPackages": [ "string" ],
        "gitHubPackages": [
          {
            "authToken": "string",
            "repository": "string"
          }
        ],
        "rscriptPath": "string",
        "rVersion": "string",
        "snapshotDate": "string",
        "userManaged": "bool"
      },
      "spark": {
        "packages": [
          {
            "artifact": "string",
            "group": "string",
            "version": "string"
          }
        ],
        "precachePackages": "bool",
        "repositories": [ "string" ]
      },
      "version": "string"
    },
    "environmentReference": {
      "name": "string",
      "version": "string"
    },
    "modelIds": [ "string" ],
    "models": [
      {
        "createdTime": "string",
        "datasets": [
          {
            "id": "string",
            "name": "string"
          }
        ],
        "derivedModelIds": [ "string" ],
        "description": "string",
        "experimentName": "string",
        "framework": "string",
        "frameworkVersion": "string",
        "id": "string",
        "kvTags": {
          "{customized property}": "string"
        },
        "mimeType": "string",
        "modifiedTime": "string",
        "name": "string",
        "parentModelId": "string",
        "properties": {
          "{customized property}": "string"
        },
        "resourceRequirements": {
          "cpu": "int",
          "cpuLimit": "int",
          "fpga": "int",
          "gpu": "int",
          "memoryInGB": "int",
          "memoryInGBLimit": "int"
        },
        "runId": "string",
        "sampleInputData": "string",
        "sampleOutputData": "string",
        "unpack": "bool",
        "url": "string",
        "version": "int"
      }
    ]
  },
  "keys": {
    "primaryKey": "string",
    "secondaryKey": "string"
  },
  "kvTags": {
    "{customized property}": "string"
  },
  "properties": {
    "{customized property}": "string"
  },
  "computeType": "string"
  // For remaining properties, see workspaces/services objects
}

workspaces/services 物件

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

針對 ACI,請使用:

  "computeType": "ACI",
  "appInsightsEnabled": "bool",
  "authEnabled": "bool",
  "cname": "string",
  "containerResourceRequirements": {
    "cpu": "int",
    "cpuLimit": "int",
    "fpga": "int",
    "gpu": "int",
    "memoryInGB": "int",
    "memoryInGBLimit": "int"
  },
  "dataCollection": {
    "eventHubEnabled": "bool",
    "storageEnabled": "bool"
  },
  "dnsNameLabel": "string",
  "encryptionProperties": {
    "keyName": "string",
    "keyVersion": "string",
    "vaultBaseUrl": "string"
  },
  "sslCertificate": "string",
  "sslEnabled": "bool",
  "sslKey": "string",
  "vnetConfiguration": {
    "subnetName": "string",
    "vnetName": "string"
  }

針對 AKS,請使用:

  "computeType": "AKS",
  "aadAuthEnabled": "bool",
  "appInsightsEnabled": "bool",
  "authEnabled": "bool",
  "autoScaler": {
    "autoscaleEnabled": "bool",
    "maxReplicas": "int",
    "minReplicas": "int",
    "refreshPeriodInSeconds": "int",
    "targetUtilization": "int"
  },
  "computeName": "string",
  "containerResourceRequirements": {
    "cpu": "int",
    "cpuLimit": "int",
    "fpga": "int",
    "gpu": "int",
    "memoryInGB": "int",
    "memoryInGBLimit": "int"
  },
  "dataCollection": {
    "eventHubEnabled": "bool",
    "storageEnabled": "bool"
  },
  "isDefault": "bool",
  "livenessProbeRequirements": {
    "failureThreshold": "int",
    "initialDelaySeconds": "int",
    "periodSeconds": "int",
    "successThreshold": "int",
    "timeoutSeconds": "int"
  },
  "maxConcurrentRequestsPerContainer": "int",
  "maxQueueWaitMs": "int",
  "namespace": "string",
  "numReplicas": "int",
  "scoringTimeoutMs": "int",
  "trafficPercentile": "int",
  "type": "string"

屬性值

workspaces/services

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

請參閱如何在 JSON ARM 樣本中設定子資源的名稱和類型。
字串 (必要)
location Azure 位置/區域的名稱。 字串
description 服務的描述。 字串
environmentImageRequest 推斷所需的環境、模型和資產。 CreateServiceRequestEnvironmentImageRequest
金鑰 驗證金鑰。 CreateServiceRequestKeys
kvTags 服務標籤字典。 標籤是可變動的。 CreateServiceRequestKvTags
properties 服務屬性字典。 屬性不可變。 CreateServiceRequestProperties
computeType 設定物件類型 ACI
AKS (必要)

ACIServiceCreateRequest

名稱 描述
computeType 服務的計算環境類型。 必要的 『ACI』 ()
appInsightsEnabled 是否啟用 Application Insights。 bool
authEnabled 服務上是否啟用驗證。 bool
cname 服務的 CName。 字串
containerResourceRequirements 容器資源需求。 ContainerResourceRequirements
dataCollection 指定之數據收集選項的詳細數據。 ACIServiceCreateRequestDataCollection
dnsNameLabel 服務的 Dns 標籤。 字串
encryptionProperties 加密屬性。 ACIServiceCreateRequestEncryptionProperties
sslCertificate 如果已啟用 SSL,則為 PEM 格式的公用 SSL 憑證。 字串
sslEnabled 是否啟用 SSL。 bool
sslKey 憑證的 PEM 格式公鑰。 字串
vnetConfiguration 虛擬網路組態。 ACIServiceCreateRequestVnetConfiguration

ContainerResourceRequirements

名稱 描述
cpu 容器要使用的 CPU 核心數量下限。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int
cpuLimit 容器允許使用的 CPU 核心數量上限。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int
Fpga 向容器公開的 FPGA PCIE 裝置數目。 必須是 2 的倍數。 int
gpu 容器中的 GPU 核心數目。 int
memoryInGB 容器要使用的最小記憶體 () 。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int
memoryInGBLimit 容器允許使用的記憶體 (上限,以 GB) 為單位。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int

ACIServiceCreateRequestDataCollection

名稱 描述
eventHubEnabled 啟用/停用事件中樞的選項。 bool
storageEnabled 啟用/停用記憶體的選項。 bool

ACIServiceCreateRequestEncryptionProperties

名稱 描述
keyName 加密金鑰名稱 需要字串 ()
keyVersion 加密金鑰版本 需要字串 ()
vaultBaseUrl 保存庫基底 URL 需要字串 ()

ACIServiceCreateRequestVnetConfiguration

名稱 描述
subnetName 虛擬網路子網的名稱。 字串
vnetName 虛擬網路的名稱。 字串

AKSServiceCreateRequest

名稱 描述
computeType 服務的計算環境類型。 'AKS' (必要)
aadAuthEnabled 是否啟用 AAD 驗證。 bool
appInsightsEnabled 是否啟用 Application Insights。 bool
authEnabled 是否啟用驗證。 bool
autoScaler 自動調整程序屬性。 AKSServiceCreateRequestAutoScaler
computeName 計算資源的名稱。 字串
containerResourceRequirements 容器資源需求。 ContainerResourceRequirements
dataCollection 指定之數據收集選項的詳細數據。 AKSServiceCreateRequestDataCollection
isDefault 這是預設的變體。 bool
livenessProbeRequirements 活躍度探查需求。 AKSServiceCreateRequestLivenessProbeRequirements
maxConcurrentRequestsPerContainer 每個容器的並行要求數目上限。 int
maxQueueWaitMs 要求在佇列中等候的時間上限, (毫秒) 。 在這段時間之後,服務會傳回 503 (服務無法使用) int
命名空間 服務的 Kubernetes 命名空間。 字串
numReplicas 叢集上的複本數目。 int
scoringTimeoutMs 評分逾時 (以毫秒為單位)。 int
trafficPercentile 流量變化接收的數量。 int
類型 變體的類型。 'Control'
'Treatment'

AKSServiceCreateRequestAutoScaler

名稱 描述
autoscaleEnabled 啟用/停用自動調整的選項。 bool
maxReplicas 叢集中的複本數目上限。 int
minReplicas 要相應減少的複本數目下限。 int
refreshPeriodInSeconds 自動調整更新之間等候的秒數。 int
targetUtilization 用來判斷是否調整叢集的目標使用率百分比。 int

AKSServiceCreateRequestDataCollection

名稱 描述
eventHubEnabled 啟用/停用事件中樞的選項。 bool
storageEnabled 啟用/停用記憶體的選項。 bool

AKSServiceCreateRequestLivenessProbeRequirements

名稱 描述
failureThreshold 傳回狀況不良狀態之前允許的失敗次數。 int
initialDelaySeconds 第一個探查前的延遲,以秒為單位。 int
periodSeconds 探查之間的時間長度,以秒為單位。 int
successThreshold 傳回狀況良好的狀態之前,成功探查的數目。 int
timeoutSeconds 探查逾時以秒為單位。 int

CreateServiceRequestEnvironmentImageRequest

名稱 描述
資產 資產清單。 ImageAsset[]
driverProgram 驅動程式檔案的名稱。 字串
Environment AZURE ML 環境的詳細數據。 EnvironmentImageRequestEnvironment
environmentReference AZURE ML 環境的唯一識別詳細數據。 EnvironmentImageRequestEnvironmentReference
modelIds 模型標識碼的清單。 string[]
模型 模型清單。 Model[]

ImageAsset

名稱 描述
id 資產標識碼。 字串
mimeType mime 類型。 字串
unpack 資產是否已解除封裝。 bool
url 資產的 URL。 字串

EnvironmentImageRequestEnvironment

名稱 描述
docker Docker 容器的定義。 ModelEnvironmentDefinitionDocker
environmentVariables 要定義於環境中之環境變數的定義。 ModelEnvironmentDefinitionEnvironmentVariables
inferencingStackVersion 已新增至映像的推斷堆疊版本。 若要避免新增推斷堆疊,請勿設定此值。 有效值:「latest」。 字串
NAME 環境的名稱。 字串
Python Python 環境的設定。 ModelEnvironmentDefinitionPython
r R 環境的設定。 ModelEnvironmentDefinitionR
Spark Spark 環境的組態。 ModelEnvironmentDefinitionSpark
version 環境版本。 字串

ModelEnvironmentDefinitionDocker

名稱 描述
baseDockerfile 用於 Docker 型執行的基底 Dockerfile。 與BaseImage互斥。 字串
baseImage 用於 Docker 型執行的基底映像。 與BaseDockerfile互斥。 字串
baseImageRegistry 包含基底映像的映像登錄。 ModelDockerSectionBaseImageRegistry

ModelDockerSectionBaseImageRegistry

名稱 描述
address 字串
密碼 字串

約束:
敏感性值。 以安全參數的形式傳入。
username 字串

約束:
敏感性值。 以安全參數的形式傳入。

ModelEnvironmentDefinitionEnvironmentVariables

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

ModelEnvironmentDefinitionPython

名稱 描述
baseCondaEnvironment 字串
condaDependencies 包含 Conda 相依性的 JObject。
interpreterPath 如果不需要環境組建,要使用的 Python 解釋器路徑。 指定的路徑會用來呼叫使用者腳本。 字串
userManagedDependencies True 表示 AzureML 重複使用現有的 Python 環境;False 表示 AzureML 會根據 Conda 相依性規格建立 Python 環境。 bool

ModelEnvironmentDefinitionR

名稱 描述
bioConductorPackages 來自Bioconductor 的套件。 string[]
cranPackages 要使用的CRAN套件。 RCranPackage[]
customUrlPackages 來自自訂 URL 的套件。 string[]
gitHubPackages 直接從 GitHub 封裝。 RGitHubPackage[]
rscriptPath 如果不需要環境組建,要使用的 Rscript 路徑。
指定的路徑會用來呼叫使用者腳本。
字串
rVersion 要安裝的 R 版本 字串
snapshotDate 要用於YYYY-MM-DD格式的 MRAN 快照集日期,例如 “2019-04-17” 字串
userManaged 指出環境是由使用者或 AzureML 管理。 bool

RCranPackage

名稱 描述
NAME 封裝名稱。 字串
repository 存放庫名稱。 字串

RGitHubPackage

名稱 描述
authToken 從私人存放庫安裝的個人存取令牌 字串

約束:
敏感性值。 以安全參數的形式傳入。
repository 格式為 username/repo[/subdir][@ref,#pull] 的存放庫位址。 字串

ModelEnvironmentDefinitionSpark

名稱 描述
套件 要使用的Spark套件。 SparkMavenPackage[]
precachePackages 是否要預先快取套件。 bool
存放庫 Spark 存放庫的清單。 string[]

SparkMavenPackage

名稱 描述
成品 字串
群組 字串
version 字串

EnvironmentImageRequestEnvironmentReference

名稱 描述
NAME 環境的名稱。 字串
version 環境的版本。 字串

型號

名稱 描述
createdTime 模型建立時間 (UTC) 。 字串
datasets 與模型相關聯的數據集清單。 DatasetReference[]
derivedModelIds 衍生自此模型的模型 string[]
description 模型描述文字。 字串
experimentName 建立此模型之實驗的名稱。 字串
架構 模型架構。 字串
frameworkVersion 模型架構版本。 字串
id 模型標識碼。 字串
kvTags 模型標籤字典。 項目可變動。 ModelKvTags
mimeType 模型內容的 MIME 類型。 如需MIME類型的詳細資訊,請開啟 https://www.iana.org/assignments/media-types/media-types.xhtml 字串 (必要)
modifiedTime 模型上次修改時間 (UTC) 。 字串
NAME 模型名稱。 字串 (必要)
parentModelId 父模型標識碼。 字串
properties Model 屬性字典。 屬性是不可變的。 ModelProperties
resourceRequirements 模型的資源需求 ContainerResourceRequirements
runId 建立此模型的 RunId。 字串
sampleInputData 模型的範例輸入數據。 工作區中數據集的參考,格式為 aml://dataset/{datasetId} 字串
sampleOutputData 模型的範例輸出數據。 工作區中數據集的參考,格式為 aml://dataset/{datasetId} 字串
unpack 指出我們是否需要在 Docker 映像建立期間將模型解壓縮。 bool
url 模型的 URL。 通常是SAS URL。 需要字串 ()
version 模型管理服務指派的模型版本。 int

DatasetReference

名稱 描述
id 數據集參考的標識碼。 字串
NAME 數據集參考的名稱。 字串

ModelKvTags

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

ModelProperties

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

CreateServiceRequestKeys

名稱 描述
primaryKey 主鍵。 字串
secondaryKey 次要金鑰。 字串

CreateServiceRequestKvTags

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

CreateServiceRequestProperties

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

快速入門範本

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

範本 描述
建立 Azure Machine Learning 服務

部署至 Azure
此範本會建立 Azure Machine Learning 服務。
(AKS) 建立 Azure Machine Learning 服務

部署至 Azure
此範本會建立 Azure Machine Learning 服務。

Terraform (AzAPI 提供者) 資源定義

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

  • 資源群組

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

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.MachineLearningServices/workspaces/services@2021-01-01"
  name = "string"
  location = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      {customized property} = "string"
    }
    computeType = "string"
    // For remaining properties, see workspaces/services objects
    description = "string"
    environmentImageRequest = {
      assets = [
        {
          id = "string"
          mimeType = "string"
          unpack = bool
          url = "string"
        }
      ]
      driverProgram = "string"
      environment = {
        docker = {
          baseDockerfile = "string"
          baseImage = "string"
          baseImageRegistry = {
            address = "string"
            password = "string"
            username = "string"
          }
        }
        environmentVariables = {
          {customized property} = "string"
        }
        inferencingStackVersion = "string"
        name = "string"
        python = {
          baseCondaEnvironment = "string"
          interpreterPath = "string"
          userManagedDependencies = bool
        }
        r = {
          bioConductorPackages = [
            "string"
          ]
          cranPackages = [
            {
              name = "string"
              repository = "string"
            }
          ]
          customUrlPackages = [
            "string"
          ]
          gitHubPackages = [
            {
              authToken = "string"
              repository = "string"
            }
          ]
          rscriptPath = "string"
          rVersion = "string"
          snapshotDate = "string"
          userManaged = bool
        }
        spark = {
          packages = [
            {
              artifact = "string"
              group = "string"
              version = "string"
            }
          ]
          precachePackages = bool
          repositories = [
            "string"
          ]
        }
        version = "string"
      }
      environmentReference = {
        name = "string"
        version = "string"
      }
      modelIds = [
        "string"
      ]
      models = [
        {
          createdTime = "string"
          datasets = [
            {
              id = "string"
              name = "string"
            }
          ]
          derivedModelIds = [
            "string"
          ]
          description = "string"
          experimentName = "string"
          framework = "string"
          frameworkVersion = "string"
          id = "string"
          kvTags = {
            {customized property} = "string"
          }
          mimeType = "string"
          modifiedTime = "string"
          name = "string"
          parentModelId = "string"
          properties = {
            {customized property} = "string"
          }
          resourceRequirements = {
            cpu = int
            cpuLimit = int
            fpga = int
            gpu = int
            memoryInGB = int
            memoryInGBLimit = int
          }
          runId = "string"
          sampleInputData = "string"
          sampleOutputData = "string"
          unpack = bool
          url = "string"
          version = int
        }
      ]
    }
    keys = {
      primaryKey = "string"
      secondaryKey = "string"
    }
    kvTags = {
      {customized property} = "string"
    }
  })
}

workspaces/services objects

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

針對 ACI,請使用:

  computeType = "ACI"
  appInsightsEnabled = bool
  authEnabled = bool
  cname = "string"
  containerResourceRequirements = {
    cpu = int
    cpuLimit = int
    fpga = int
    gpu = int
    memoryInGB = int
    memoryInGBLimit = int
  }
  dataCollection = {
    eventHubEnabled = bool
    storageEnabled = bool
  }
  dnsNameLabel = "string"
  encryptionProperties = {
    keyName = "string"
    keyVersion = "string"
    vaultBaseUrl = "string"
  }
  sslCertificate = "string"
  sslEnabled = bool
  sslKey = "string"
  vnetConfiguration = {
    subnetName = "string"
    vnetName = "string"
  }

針對 AKS,請使用:

  computeType = "AKS"
  aadAuthEnabled = bool
  appInsightsEnabled = bool
  authEnabled = bool
  autoScaler = {
    autoscaleEnabled = bool
    maxReplicas = int
    minReplicas = int
    refreshPeriodInSeconds = int
    targetUtilization = int
  }
  computeName = "string"
  containerResourceRequirements = {
    cpu = int
    cpuLimit = int
    fpga = int
    gpu = int
    memoryInGB = int
    memoryInGBLimit = int
  }
  dataCollection = {
    eventHubEnabled = bool
    storageEnabled = bool
  }
  isDefault = bool
  livenessProbeRequirements = {
    failureThreshold = int
    initialDelaySeconds = int
    periodSeconds = int
    successThreshold = int
    timeoutSeconds = int
  }
  maxConcurrentRequestsPerContainer = int
  maxQueueWaitMs = int
  namespace = "string"
  numReplicas = int
  scoringTimeoutMs = int
  trafficPercentile = int
  type = "string"

屬性值

workspaces/services

名稱 描述
類型 資源類型 “Microsoft.MachineLearningServices/workspaces/services@2021-01-01”
NAME 資源名稱 需要字串 ()
location Azure 位置/區域的名稱。 字串
parent_id 此資源父系之資源的標識碼。 類型資源的標識碼: 工作區
description 服務的描述。 字串
environmentImageRequest 推斷所需的環境、模型和資產。 CreateServiceRequestEnvironmentImageRequest
金鑰 驗證金鑰。 CreateServiceRequestKeys
kvTags 服務標籤字典。 標籤是可變動的。 CreateServiceRequestKvTags
properties 服務屬性字典。 屬性是不可變的。 CreateServiceRequestProperties
computeType 設定物件類型 ACI
需要 AKS ()

ACIServiceCreateRequest

名稱 描述
computeType 服務的計算環境類型。 “ACI” (必要)
appInsightsEnabled 是否啟用 Application Insights。 bool
authEnabled 服務上是否啟用驗證。 bool
cname 服務的 CName。 字串
containerResourceRequirements 容器資源需求。 ContainerResourceRequirements
dataCollection 指定之數據收集選項的詳細數據。 ACIServiceCreateRequestDataCollection
dnsNameLabel 服務的 Dns 標籤。 字串
encryptionProperties 加密屬性。 ACIServiceCreateRequestEncryptionProperties
sslCertificate 如果已啟用 SSL,則為 PEM 格式的公用 SSL 憑證。 字串
sslEnabled 是否啟用 SSL。 bool
sslKey 憑證的 PEM 格式公開 SSL 金鑰。 字串
vnetConfiguration 虛擬網路組態。 ACIServiceCreateRequestVnetConfiguration

ContainerResourceRequirements

名稱 描述
cpu 容器要使用的 CPU 核心數量下限。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int
cpuLimit 容器允許使用的 CPU 核心數量上限。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int
Fpga 公開給容器的 FPGA PCIE 裝置數目。 必須是 2 的倍數。 int
gpu 容器中的 GPU 核心數目。 int
memoryInGB 容器要使用的最小記憶體 () 。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int
memoryInGBLimit 容器允許使用的記憶體 (上限,以 GB) 為單位。 其他資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
int

ACIServiceCreateRequestDataCollection

名稱 描述
eventHubEnabled 啟用/停用事件中樞的選項。 bool
storageEnabled 啟用/停用記憶體的選項。 bool

ACIServiceCreateRequestEncryptionProperties

名稱 描述
keyName 加密金鑰名稱 字串 (必要)
keyVersion 加密金鑰版本 字串 (必要)
vaultBaseUrl 保存庫基底 URL 字串 (必要)

ACIServiceCreateRequestVnetConfiguration

名稱 描述
subnetName 虛擬網路子網的名稱。 字串
vnetName 虛擬網路的名稱。 字串

AKSServiceCreateRequest

名稱 描述
computeType 服務的計算環境類型。 必要的 「AKS」 ()
aadAuthEnabled 是否啟用 AAD 驗證。 bool
appInsightsEnabled 是否啟用 Application Insights。 bool
authEnabled 是否啟用驗證。 bool
autoScaler 自動調整器屬性。 AKSServiceCreateRequestAutoScaler
computeName 計算資源的名稱。 字串
containerResourceRequirements 容器資源需求。 ContainerResourceRequirements
dataCollection 指定之數據收集選項的詳細數據。 AKSServiceCreateRequestDataCollection
isDefault 這是預設變體。 bool
livenessProbeRequirements 即時探查需求。 AKSServiceCreateRequestLivenessProbeRequirements
maxConcurrentRequestsPerContainer 每個容器的並行要求數目上限。 int
maxQueueWaitMs 要求在佇列中等候的時間上限,以毫秒為單位 () 。 這次之後,服務會傳回 503 (服務無法使用) int
命名空間 服務的 Kubernetes 命名空間。 字串
numReplicas 叢集上的複本數目。 int
scoringTimeoutMs 評分逾時 (以毫秒為單位)。 int
trafficPercentile 流量變化接收的數量。 int
類型 變體的類型。 “Control”
“處理”

AKSServiceCreateRequestAutoScaler

名稱 描述
autoscaleEnabled 啟用/停用自動調整的選項。 bool
maxReplicas 叢集中的複本數目上限。 int
minReplicas 要相應減少的複本數目下限。 int
refreshPeriodInSeconds 自動調整更新之間等候的秒數。 int
targetUtilization 用來判斷是否調整叢集的目標使用率百分比。 int

AKSServiceCreateRequestDataCollection

名稱 描述
eventHubEnabled 啟用/停用事件中樞的選項。 bool
storageEnabled 啟用/停用記憶體的選項。 bool

AKSServiceCreateRequestLivenessProbeRequirements

名稱 描述
failureThreshold 傳回狀況不良狀態之前允許的失敗次數。 int
initialDelaySeconds 第一次探查之前的延遲,以秒為單位。 int
periodSeconds 探查之間的時間長度,以秒為單位。 int
successThreshold 傳回狀況良好狀態之前成功的探查數目。 int
timeoutSeconds 探查逾時,以秒為單位。 int

CreateServiceRequestEnvironmentImageRequest

名稱 描述
資產 資產清單。 ImageAsset[]
driverProgram 驅動程式檔案的名稱。 字串
Environment AZURE ML 環境的詳細數據。 EnvironmentImageRequestEnvironment
environmentReference AZURE ML 環境的唯一識別詳細數據。 EnvironmentImageRequestEnvironmentReference
modelIds 模型標識碼的清單。 string[]
模型 模型清單。 Model[]

ImageAsset

名稱 描述
id 資產標識碼。 字串
mimeType mime 類型。 字串
unpack 資產是否已解壓縮。 bool
url 資產的 URL。 字串

EnvironmentImageRequestEnvironment

名稱 描述
docker Docker 容器的定義。 ModelEnvironmentDefinitionDocker
environmentVariables 要定義於環境中之環境變數的定義。 ModelEnvironmentDefinitionEnvironmentVariables
inferencingStackVersion 已新增至映像的推斷堆疊版本。 若要避免新增推斷堆疊,請勿設定此值。 有效值:「latest」。 字串
NAME 環境的名稱。 字串
Python Python 環境的設定。 ModelEnvironmentDefinitionPython
r R 環境的設定。 ModelEnvironmentDefinitionR
Spark Spark 環境的組態。 ModelEnvironmentDefinitionSpark
version 環境版本。 字串

ModelEnvironmentDefinitionDocker

名稱 描述
baseDockerfile 用於 Docker 型執行的基底 Dockerfile。 與BaseImage互斥。 字串
baseImage 用於 Docker 型執行的基底映像。 與BaseDockerfile互斥。 字串
baseImageRegistry 包含基底映像的映像登錄。 ModelDockerSectionBaseImageRegistry

ModelDockerSectionBaseImageRegistry

名稱 描述
address 字串
密碼 字串

約束:
敏感性值。 以安全參數的形式傳入。
username 字串

約束:
敏感性值。 以安全參數的形式傳入。

ModelEnvironmentDefinitionEnvironmentVariables

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

ModelEnvironmentDefinitionPython

名稱 描述
baseCondaEnvironment 字串
condaDependencies 包含 Conda 相依性的 JObject。
interpreterPath 如果不需要環境組建,要使用的 Python 解釋器路徑。 指定的路徑會用來呼叫使用者腳本。 字串
userManagedDependencies True 表示 AzureML 重複使用現有的 Python 環境;False 表示 AzureML 會根據 Conda 相依性規格建立 Python 環境。 bool

ModelEnvironmentDefinitionR

名稱 描述
bioConductorPackages 來自Bioconductor 的套件。 string[]
cranPackages 要使用的CRAN套件。 RCranPackage[]
customUrlPackages 來自自訂 URL 的套件。 string[]
gitHubPackages 直接從 GitHub 封裝。 RGitHubPackage[]
rscriptPath 如果不需要環境組建,要使用的 Rscript 路徑。
指定的路徑會用來呼叫使用者腳本。
字串
rVersion 要安裝的 R 版本 字串
snapshotDate 要用於YYYY-MM-DD格式的 MRAN 快照集日期,例如 “2019-04-17” 字串
userManaged 指出環境是由使用者或 AzureML 管理。 bool

RCranPackage

名稱 描述
NAME 封裝名稱。 字串
repository 存放庫名稱。 字串

RGitHubPackage

名稱 描述
authToken 從私人存放庫安裝的個人存取令牌 字串

約束:
敏感性值。 以安全參數的形式傳入。
repository 格式為 username/repo[/subdir][@ref,#pull] 的存放庫位址。 字串

ModelEnvironmentDefinitionSpark

名稱 描述
套件 要使用的Spark套件。 SparkMavenPackage[]
precachePackages 是否要預先快取套件。 bool
存放庫 Spark 存放庫的清單。 string[]

SparkMavenPackage

名稱 描述
成品 字串
群組 字串
version 字串

EnvironmentImageRequestEnvironmentReference

名稱 描述
NAME 環境的名稱。 字串
version 環境的版本。 字串

型號

名稱 描述
createdTime 模型建立時間 (UTC) 。 字串
datasets 與模型相關聯的數據集清單。 DatasetReference[]
derivedModelIds 衍生自此模型的模型 string[]
description 模型描述文字。 字串
experimentName 建立此模型之實驗的名稱。 字串
架構 模型架構。 字串
frameworkVersion 模型架構版本。 字串
id 模型標識碼。 字串
kvTags 模型標籤字典。 項目可變動。 ModelKvTags
mimeType 模型內容的 MIME 類型。 如需MIME類型的詳細資訊,請開啟 https://www.iana.org/assignments/media-types/media-types.xhtml 字串 (必要)
modifiedTime 模型上次修改時間 (UTC) 。 字串
NAME 模型名稱。 字串 (必要)
parentModelId 父模型標識碼。 字串
properties Model 屬性字典。 屬性不可變。 ModelProperties
resourceRequirements 模型的資源需求 ContainerResourceRequirements
runId 建立此模型的 RunId。 字串
sampleInputData 模型的輸入數據範例。 工作區中數據集的參考,格式為 aml://dataset/{datasetId} 字串
sampleOutputData 模型的範例輸出數據。 工作區中數據集的參考,格式為 aml://dataset/{datasetId} 字串
unpack 指出我們是否需要在 Docker 映像建立期間將模型解壓縮。 bool
url 模型的 URL。 通常是SAS URL。 需要字串 ()
version 模型管理服務指派的模型版本。 int

DatasetReference

名稱 描述
id 數據集參考的標識碼。 字串
NAME 數據集參考的名稱。 字串

ModelKvTags

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

ModelProperties

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

CreateServiceRequestKeys

名稱 描述
primaryKey 主鍵。 字串
secondaryKey 次要金鑰。 字串

CreateServiceRequestKvTags

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

CreateServiceRequestProperties

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