CLI (v2) モデル YAML スキーマ

APPLIES TO:Azure CLI ml 拡張機能 v2 (current)

ソース JSON スキーマは https://azuremlschemas.azureedge.net/latest/model.schema.json にあります。

Note

このドキュメントで詳しく説明されている YAML 構文は、最新バージョンの ML CLI v2 拡張機能の JSON スキーマに基づいています。 この構文は、ML CLI v2 拡張機能の最新バージョンでのみ動作することが保証されています。 以前のバージョンの拡張機能のスキーマについては、https://azuremlschemasprod.azureedge.net/ でご確認いただけます。

YAML syntax

Key タイプ Description Allowed values
$schema 文字列 YAML スキーマ。
name 文字列 Required. モデルの名前。
version int モデルのバージョン。 省略すると、Azure Machine Learningはバージョンを自動生成します。
description 文字列 モデルの説明。
tags オブジェクト モデルのタグの辞書。
path 文字列 モデル ファイルへのローカル パス、またはモデル ファイルへのクラウド パスの URI のいずれかです。 これは、ファイルまたはディレクトリのいずれかを指します。
type 文字列 モデルの Storage 形式の型。 コードをデプロイしない場合に適用されます。 custom_modelmlflow_modeltriton_model
flavors オブジェクト モデルのフレーバー。 各モデル ストレージ形式の種類には、1 つまたは複数のサポートされているフレーバーを含めることができます。 コードをデプロイしない場合に適用されます。
default_deployment_template オブジェクト モデルの既定のデプロイ テンプレート。
default_deployment_template.asset_id 文字列 デプロイ テンプレートの資産 ID。 形式: azureml://registries/{registry_name}/deploymenttemplates/{template_name}/versions/{version}.

Remarks

az ml model コマンドは、Azure Machine Learning モデルの管理に使用できます。

Examples

例は、サンプル GitHub リポジトリで使用できます。 以下にいくつか示します。

YAML: ローカル ファイル

$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json
name: local-file-example
path: mlflow-model/model.pkl
description: Model created from local file.

YAML: MLflow 形式のローカル フォルダー

$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json
name: local-mlflow-example
path: mlflow-model
type: mlflow_model
description: Model created from local MLflow model directory.

YAML: 既定のデプロイ テンプレート

$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json
name: my-model
version: 1
path: ./model
default_deployment_template:
  asset_id: azureml://registries/my-registry/deploymenttemplates/my-template/versions/1