Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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. | |
default_deployment_template |
object | The default deployment template for the model. Applies to registry-scoped models only. When set, deployments that reference this model use the deployment template's settings (such as environment, instance_type, and probes) by default. |
|
default_deployment_template.asset_id |
string | The asset ID of the deployment template. Format: azureml://registries/<registry-name>/deploymenttemplates/<template-name>/versions/<version>. |
|
allowed_deployment_templates |
list of objects | Author guidance listing the deployment templates that a consumer is recommended to use as overrides when they deploy this model — a curated set of validated templates. It isn't enforced: an override specified at deployment time isn't required to be in this list. | |
allowed_deployment_templates[].asset_id |
string | The asset ID of an allowed deployment template. Format: azureml://registries/<registry-name>/deploymenttemplates/<template-name>/labels/latest. |
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.
YAML: default deployment template
$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
YAML: default and allowed deployment templates
$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json
name: my-model
version: 1
type: custom_model
path: ./model
default_deployment_template:
asset_id: azureml://registries/my-registry/deploymenttemplates/my-template/versions/1
allowed_deployment_templates:
- asset_id: azureml://registries/my-registry/deploymenttemplates/my-template/labels/latest
- asset_id: azureml://registries/my-registry/deploymenttemplates/my-template2/labels/latest