Share via


az ml online-deployment

Note

This reference is part of the ml extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az ml online-deployment command. Learn more about extensions.

Manage Azure ML online deployments.

Azure ML deployments provide a simple interface for creating and managing model deployments.

Commands

Name Description Type Status
az ml online-deployment create

Create a deployment. If the deployment already exists, it will fail. If you want to update existing deployment, use az ml online-deployment update.

Extension GA
az ml online-deployment delete

Delete a deployment.

Extension GA
az ml online-deployment get-logs

Get the container logs for an online deployment.

Extension GA
az ml online-deployment list

List deployments.

Extension GA
az ml online-deployment show

Show a deployment.

Extension GA
az ml online-deployment update

Update a deployment.

Extension GA

az ml online-deployment create

Create a deployment. If the deployment already exists, it will fail. If you want to update existing deployment, use az ml online-deployment update.

Minimum recommended compute SKU is Standard_DS3_v2 for general purpose endpoints. Learn more about SKUs here: https://learn.microsoft.com/en-us/azure/machine-learning/reference-managed-online-endpoints-vm-sku-list.

az ml online-deployment create --file
                               --resource-group
                               --workspace-name
                               [--all-traffic]
                               [--endpoint-name]
                               [--local {false, true}]
                               [--local-enable-gpu {false, true}]
                               [--name]
                               [--no-wait]
                               [--package-model]
                               [--set]
                               [--skip-script-validation]
                               [--vscode-debug {false, true}]
                               [--web]

Examples

Create a deployment from a YAML specification file

az ml online-deployment create --file deployment.yaml --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--file -f

Local path to the YAML file containing the Azure ML online-deployment specification. The YAML reference docs for online-deployment can be found at: https://aka.ms/ml-cli-v2-deployment-managed-online-yaml-reference, https://aka.ms/ml-cli-v2-deployment-kubernetes-online-yaml-reference.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>.

Optional Parameters

--all-traffic

Sets endpoint traffic 100% to this deployment after successful creation, does not work with --no-wait.

Default value: False
--endpoint-name -e

Name of the online endpoint.

--local

Create deployment locally using Docker. Only one deployment per endpoint is allowed. Note: If specified endpoint doesn't exist, it will be created.

Accepted values: false, true
Default value: False
--local-enable-gpu

Enable GPU for local deployment.

Accepted values: false, true
Default value: False
--name -n

Name of the deployment.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--package-model

[THIS IS IN PREVIEW] Create packaged environment from the deployment yaml and use the packaged environment for the deployment.

Default value: False
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--skip-script-validation

Allows user to bypass deployment scoring script validation.

Default value: False
--vscode-debug

Create local endpoint and attach VSCode debugger. Only works with --local flag.

Accepted values: false, true
Default value: False
--web

Show the deployment's details in Azure ML studio in a web browser.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ml online-deployment delete

Delete a deployment.

az ml online-deployment delete --endpoint-name
                               --name
                               --resource-group
                               --workspace-name
                               [--local {false, true}]
                               [--no-wait]
                               [--yes]

Examples

Delete a deployment with confirmation

az ml online-deployment delete --name my-deployment --endpoint-name my-endpoint --yes --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--endpoint-name -e

Name of the online endpoint.

--name -n

Name of the deployment.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>.

Optional Parameters

--local

Delete local deployment from Docker environment.

Accepted values: false, true
Default value: False
--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ml online-deployment get-logs

Get the container logs for an online deployment.

az ml online-deployment get-logs --endpoint-name
                                 --name
                                 --resource-group
                                 --workspace-name
                                 [--container]
                                 [--lines]
                                 [--local {false, true}]

Examples

Get the container logs for an online deployment

az ml online-deployment get-logs --name my-deployment --endpoint-name my-endpoint --lines 100 --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--endpoint-name -e

Name of the online endpoint.

--name -n

Name of the deployment.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>.

Optional Parameters

--container -c

The type of container from which to retrieve logs. Allowed values: inference-server, storage-initializer.

--lines -l

The maximum number of lines to tail.

Default value: 5000
--local

Get logs from local deployment in Docker environment.

Accepted values: false, true
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ml online-deployment list

List deployments.

az ml online-deployment list --endpoint-name
                             --resource-group
                             --workspace-name
                             [--local {false, true}]

Examples

List deployment in an endpoint

az ml online-deployment list --endpoint-name my-endpoint --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--endpoint-name -e

Name of the endpoint.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>.

Optional Parameters

--local

List local deployment under this local endpoint.

Accepted values: false, true
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ml online-deployment show

Show a deployment.

az ml online-deployment show --endpoint-name
                             --name
                             --resource-group
                             --workspace-name
                             [--local {false, true}]
                             [--web]

Examples

Show a deployment

az ml online-deployment show --name my-deployment --endpoint-name my-endpoint --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--endpoint-name -e

Name of the online endpoint.

--name -n

Name of the deployment.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>.

Optional Parameters

--local

Show local deployment from Docker environment.

Accepted values: false, true
Default value: False
--web

Show the deployment's details in Azure ML studio in a web browser.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ml online-deployment update

Update a deployment.

az ml online-deployment update --resource-group
                               --workspace-name
                               [--add]
                               [--endpoint-name]
                               [--file]
                               [--force-string]
                               [--local {false, true}]
                               [--local-enable-gpu {false, true}]
                               [--name]
                               [--no-wait]
                               [--remove]
                               [--set]
                               [--skip-script-validation]
                               [--vscode-debug {false, true}]
                               [--web]

Examples

Update a deployment from a YAML specification file

az ml online-deployment update --file deployment.yaml --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Default value: []
--endpoint-name -e

Name of the online endpoint.

--file -f

Local path to the YAML file containing the Azure ML online-deployment specification. The YAML reference docs for online-deployment can be found at: https://aka.ms/ml-cli-v2-deployment-managed-online-yaml-reference, https://aka.ms/ml-cli-v2-deployment-kubernetes-online-yaml-reference.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Default value: False
--local

Update local deployment in Docker environment.

Accepted values: false, true
Default value: False
--local-enable-gpu

Enable GPU for local deployment.

Accepted values: false, true
Default value: False
--name -n

Name of the deployment.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Default value: []
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Default value: []
--skip-script-validation

Allows user to bypass deployment scoring script validation.

Default value: False
--vscode-debug

Update local endpoint and re-attach VSCode debugger. Only works with --local flag.

Accepted values: false, true
Default value: False
--web

Show the deployment's details in Azure ML studio in a web browser.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.