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: {}
        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: {}
  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

名字 描述 價值
名字 資源名稱

請參閱如何在 Bicep 中設定子資源的名稱和類型。
字串 (必要)
位置 Azure 位置/區域的名稱。 字串
父母 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型的資源符號名稱:工作區
描述 服務的描述。 字串
environmentImageRequest 推斷所需的環境、模型和資產。 CreateServiceRequestEnvironmentImageRequest
鑰匙 驗證金鑰。 CreateServiceRequestKeys
kvTags 服務標籤字典。 標記是可變動的。 物件
性能 服務屬性字典。 屬性是不可變的。 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 核心數量下限。 詳細資訊:
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 容器要使用的記憶體數量下限(以 GB 為單位)。 詳細資訊:
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
namespace 服務的 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 驅動程式檔案的名稱。 字串
環境 AZURE ML 環境的詳細數據。 EnvironmentImageRequestEnvironment
environmentReference AZURE ML 環境的唯一識別詳細數據。 EnvironmentImageRequestEnvironmentReference
modelIds 模型標識碼的清單。 string[]
模型 模型清單。 模型[]

ImageAsset

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

EnvironmentImageRequestEnvironment

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

ModelEnvironmentDefinitionDocker

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

ModelDockerSectionBaseImageRegistry

名字 描述 價值
位址 字串
密碼 字串

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

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

ModelEnvironmentDefinitionEnvironmentVariables

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

ModelEnvironmentDefinitionPython

名字 描述 價值
baseCondaEnvironment 字串
condaDependencies 包含 Conda 相依性的 JObject。 針對 Bicep,您可以使用 any() 函式。
解釋器路徑 如果不需要環境組建,要使用的 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

名字 描述 價值
名字 套件名稱。 字串
存儲庫 存放庫名稱。 字串

RGitHubPackage

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

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

ModelEnvironmentDefinitionSpark

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

SparkMavenPackage

名字 描述 價值
人工製品 字串
字串
版本 字串

EnvironmentImageRequestEnvironmentReference

名字 描述 價值
名字 環境的名稱。 字串
版本 環境的版本。 字串

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

DatasetReference

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

ModelProperties

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

CreateServiceRequestKeys

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

CreateServiceRequestProperties

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

快速入門範本

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

範本 描述
建立 Azure Machine Learning Service

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

部署至 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": {},
        "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": {},
  "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'
名字 資源名稱

請參閱如何在JSON ARM 範本中設定子資源的名稱和類型。
字串 (必要)
位置 Azure 位置/區域的名稱。 字串
描述 服務的描述。 字串
environmentImageRequest 推斷所需的環境、模型和資產。 CreateServiceRequestEnvironmentImageRequest
鑰匙 驗證金鑰。 CreateServiceRequestKeys
kvTags 服務標籤字典。 標記是可變動的。 物件
性能 服務屬性字典。 屬性是不可變的。 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 核心數量下限。 詳細資訊:
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 容器要使用的記憶體數量下限(以 GB 為單位)。 詳細資訊:
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
namespace 服務的 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 驅動程式檔案的名稱。 字串
環境 AZURE ML 環境的詳細數據。 EnvironmentImageRequestEnvironment
environmentReference AZURE ML 環境的唯一識別詳細數據。 EnvironmentImageRequestEnvironmentReference
modelIds 模型標識碼的清單。 string[]
模型 模型清單。 模型[]

ImageAsset

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

EnvironmentImageRequestEnvironment

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

ModelEnvironmentDefinitionDocker

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

ModelDockerSectionBaseImageRegistry

名字 描述 價值
位址 字串
密碼 字串

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

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

ModelEnvironmentDefinitionEnvironmentVariables

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

ModelEnvironmentDefinitionPython

名字 描述 價值
baseCondaEnvironment 字串
condaDependencies 包含 Conda 相依性的 JObject。
解釋器路徑 如果不需要環境組建,要使用的 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

名字 描述 價值
名字 套件名稱。 字串
存儲庫 存放庫名稱。 字串

RGitHubPackage

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

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

ModelEnvironmentDefinitionSpark

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

SparkMavenPackage

名字 描述 價值
人工製品 字串
字串
版本 字串

EnvironmentImageRequestEnvironmentReference

名字 描述 價值
名字 環境的名稱。 字串
版本 環境的版本。 字串

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

DatasetReference

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

ModelProperties

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

CreateServiceRequestKeys

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

CreateServiceRequestProperties

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

快速入門範本

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

範本 描述
建立 Azure Machine Learning Service

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

部署至 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"
  // For remaining properties, see workspaces/services objects
  body = jsonencode({
    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 = {}
          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 = {}
    body = jsonencode({
    properties = {
      {customized property} = "string"
    }
    computeType = "string"
  })
}

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@2021-01-01”
名字 資源名稱 字串 (必要)
位置 Azure 位置/區域的名稱。 字串
parent_id 此資源為父系之資源的標識碼。 類型資源的標識碼:工作區
描述 服務的描述。 字串
environmentImageRequest 推斷所需的環境、模型和資產。 CreateServiceRequestEnvironmentImageRequest
鑰匙 驗證金鑰。 CreateServiceRequestKeys
kvTags 服務標籤字典。 標記是可變動的。 物件
性能 服務屬性字典。 屬性是不可變的。 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 核心數量下限。 詳細資訊:
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 容器要使用的記憶體數量下限(以 GB 為單位)。 詳細資訊:
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
namespace 服務的 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 驅動程式檔案的名稱。 字串
環境 AZURE ML 環境的詳細數據。 EnvironmentImageRequestEnvironment
environmentReference AZURE ML 環境的唯一識別詳細數據。 EnvironmentImageRequestEnvironmentReference
modelIds 模型標識碼的清單。 string[]
模型 模型清單。 模型[]

ImageAsset

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

EnvironmentImageRequestEnvironment

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

ModelEnvironmentDefinitionDocker

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

ModelDockerSectionBaseImageRegistry

名字 描述 價值
位址 字串
密碼 字串

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

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

ModelEnvironmentDefinitionEnvironmentVariables

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

ModelEnvironmentDefinitionPython

名字 描述 價值
baseCondaEnvironment 字串
condaDependencies 包含 Conda 相依性的 JObject。
解釋器路徑 如果不需要環境組建,要使用的 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

名字 描述 價值
名字 套件名稱。 字串
存儲庫 存放庫名稱。 字串

RGitHubPackage

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

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

ModelEnvironmentDefinitionSpark

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

SparkMavenPackage

名字 描述 價值
人工製品 字串
字串
版本 字串

EnvironmentImageRequestEnvironmentReference

名字 描述 價值
名字 環境的名稱。 字串
版本 環境的版本。 字串

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

DatasetReference

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

ModelProperties

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

CreateServiceRequestKeys

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

CreateServiceRequestProperties

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