共用方式為


CLI (v2) 功能集 YAML 架構

適用於:Azure CLI ML 延伸模組第 2 版 (目前)

注意

此文件中詳述的 YAML 語法是以最新版 ML CLI v2 延伸模組的 JSON 結構描述為基礎。 此語法只保證能與最新版的 ML CLI v2 延伸模組搭配使用。 您可以在 https://azuremlschemasprod.azureedge.net/ 找到舊版延伸模組的結構描述。

YAML 語法

索引鍵 類型 描述 允許的值 預設值
$schema 字串 YAML 結構描述。 如果您使用 Azure Machine Learning VS Code 擴充功能來撰寫 YAML 檔案,包括檔案頂端的$schema可讓您叫用架構和資源完成。
NAME 字串 必要。 功能集名稱。
version 字串 必要。 功能集版本。
description 字串 功能集描述。
規格 object 必要。 功能集規格。
specification.path string 必填 本機功能集規格資料夾的路徑。
實體 物件 (字串清單) 必要。 此功能集相關聯的實體。
stage (階段) string 功能集階段。 開發、生產、封存 部署
tags object 功能集標籤的字典。
materialization_settings object 功能集具體化設定。
materialization_settings.offline_enabled boolean 是否啟用將特徵值具體化為離線儲存體。 True、False
materialization_settings.schedule object 具體化排程。 請參閱 CLI (v2) 排程 YAML 架構
materialization_settings.schedule.frequency string 如果已設定排程,則為必要專案。 列舉來描述週期排程的頻率。 Day、Hour、Minute、Week、Month
materialization_settings.schedule.interval 整數 如果已設定排程,則為必要專案。 迴圈作業之間的間隔。
materialization_settings.schedule.time_zone string 排程觸發時區。 UTC
materialization_settings.schedule.start_time string 排程觸發程式時間。
materialization_settings.notification object 具體化通知設定。
materialization_settings.notification.email_on 物件 (字串清單) 如果已設定通知,則為必要專案。 當作業狀態符合此設定時,就會傳送電子郵件通知。 JobFailed、JobCompleted、JobCancelled。
materialization_settings.notification.emails 物件 (字串清單) 如果已設定通知,則為必要專案。 傳送通知的電子郵件地址。
materialization_settings.resource object 用於具體化作業的 Azure Machine Learning Spark 計算資源。
materialization_settings.resource.instance_type string Azure Machine Learning Spark 計算實例類型。 Standard_E4s_v3、Standard_E8s_v3、Standard_E16s_v3、Standard_E32s_v3、Standard_E64s_v3。 請參閱 Azure Machine Learning (preview) 中的 Apache Spark 互動資料整頓 ,以取得支援類型的更新清單。
materialization_settings.spark_configuration 字典 Spark 組態的字典

備註

az ml feature-set命令可用來管理功能集。

範例

範例 GitHub 存放庫中有範例可用。 以下顯示其中幾個。

YAML:基本

$schema: http://azureml/sdk-2-0/Featureset.json

name: transactions
version: "1"
description: 7-day and 3-day rolling aggregation of transactions featureset
specification:
  path: ./spec # path to feature set specification folder. Can be local (absolute path or relative path to current location) or cloud uri. Contains FeatureSetSpec.yaml + transformation code
entities: # entities associated with this feature-set
  - azureml:account:1
stage: Development

YAML:使用具體化設定

name: transactions
version: "1"
description: 7-day and 3-day rolling aggregation of transactions featureset
specification:
  path: ./spec # path to feature set specification folder. Can be local (absolute path or relative path to current location) or cloud uri. Contains FeatureSetSpec.yaml + transformation code
entities: # entities associated with this feature-set
  - azureml:account:1
stage: Development
materialization_settings:
    offline_enabled: True
    schedule: # we use existing definition of schedule under job with some constraints. Recurrence pattern will not be supported.
        type: recurrence  # Only recurrence type would be supported
        frequency: Day # Only support Day and Hour
        interval: 1 #every day
        time_zone: "Pacific Standard Time"
    notification: 
        email_on:
        - JobFailed
        emails:
        - alice@microsoft.com

    resource:
        instance_type: Standard_E8S_V3
    spark_configuration:
        spark.driver.cores: 4
        spark.driver.memory: 36g
        spark.executor.cores: 4
        spark.executor.memory: 36g
        spark.executor.instances: 2

後續步驟