CLI (v2) model YAML schema

APPLIES TO: Azure CLI ml extension v2 (current)

The source JSON schema can be found at https://azuremlschemas.azureedge.net/latest/model.schema.json.

Note

The YAML syntax detailed in this document is based on the JSON schema for the latest version of the ML CLI v2 extension. This syntax is guaranteed only to work with the latest version of the ML CLI v2 extension. You can find the schemas for older extension versions at https://azuremlschemasprod.azureedge.net/.

YAML syntax

Key Type Description Allowed values
$schema string The YAML schema.
name string Required. Name of the model.
version int Version of the model. If omitted, Azure Machine Learning will autogenerate a version.
description string Description of the model.
tags object Dictionary of tags for the model.
path string Either a local path to the model file(s), or the URI of a cloud path to the model file(s). This can point to either a file or a directory.
type string Storage format type of the model. Applicable for no-code deployment scenarios. custom_model, mlflow_model, triton_model
flavors object Flavors of the model. Each model storage format type may have one or more supported flavors. Applicable for no-code deployment scenarios.

Remarks

The az ml model command can be used for managing Azure Machine Learning models.

Examples

Examples are available in the examples GitHub repository. Several are shown below.

YAML: local file

$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: local folder in MLflow format

$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.