CLI (v2) 功能集 YAML 架構

適用於:Azure CLI ml 延伸模組 v2 (目前)

注意

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

YAML 語法

機碼 類型 描述 允許的值 預設值
$schema 字串 YAML 結構描述。 如果您使用 Azure 機器學習 VS Code 擴充功能來撰寫 YAML 檔案,包括檔案頂端的$schema,可讓您叫用架構和資源完成。
NAME 字串 必要。 功能集名稱。
version 字串 必要。 功能集版本。
description 字串 功能集描述。
規格 object 必要。 功能集規格。
specification.path 字串 本機功能集規格資料夾的必要 路徑。
實體 物件 (字串清單) 必要。 此功能集相關聯的實體。
之後 字串 功能集階段。 開發、生產、封存 部署
標記 object 功能集標籤標的字典。
materialization_settings object 功能集具體化設定。
materialization_settings.offline_enabled boolean 是否啟用將功能值具體化為離線記憶體。 True、False
materialization_settings.schedule object 具體化排程。 請參閱 CLI (v2) 排程 YAML 架構
materialization_settings.schedule.frequency 字串 如果已設定排程,則為必要 。 列舉來描述週期排程的頻率。 Day、Hour、Minute、Week、Month Day
materialization_settings.schedule.interval 整數 如果已設定排程,則為必要 。 週期性作業之間的間隔。
materialization_settings.schedule.time_zone 字串 排程觸發時區。 UTC
materialization_settings.schedule.start_time 字串 排程觸發時間。
materialization_settings.notification object 具體化通知設定。
materialization_settings.notification.email_on 物件 (字串清單) 如果已設定通知,則為必要 專案。 工作狀態符合此設定時,會傳送電子郵件通知。 JobFailed、JobCompleted、JobCancelled。
materialization_settings.notification.emails 物件 (字串清單) 如果已設定通知,則為必要 專案。 通知傳送至的電子郵件位址。
materialization_settings.resource object 用於具體化作業的 Azure 機器學習 Spark 計算資源。
materialization_settings.resource.instance_type 字串 Azure 機器學習 Spark 計算實例類型。 Standard_E4s_v3、Standard_E8s_v3、Standard_E16s_v3、Standard_E32s_v3、Standard_E64s_v3。 請參閱 Azure 機器學習 中與 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

下一步