az ml online-deployment

Note

This reference is part of the ml extension for Azure CLI and requires 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

az ml online-deployment create

Create a deployment. If the deployment already exists, it will be over-written with the new settings.

az ml online-deployment delete

Delete a deployment.

az ml online-deployment get-logs

Get the container logs for an online deployment.

az ml online-deployment list

List deployments.

az ml online-deployment show

Show a deployment.

az ml online-deployment update

Update a deployment.

az ml online-deployment create

Create a deployment. If the deployment already exists, it will be over-written with the new settings.

az ml online-deployment create --file
                               --resource-group
                               --workspace-name
                               [--all-traffic]
                               [--endpoint-name]
                               [--local {false, true}]
                               [--name]
                               [--no-wait]
                               [--set]
                               [--vscode-debug {false, true}]

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 deployment specification.

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

--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
--name -n

Name of the deployment.

--no-wait

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

--set

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

--vscode-debug

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

accepted values: false, true

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 group using az configure --defaults workspace=<name>.

Optional Parameters

--local

Delete local deployment from Docker environment.

accepted values: false, true
--no-wait

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

--yes -y

Do not prompt for confirmation.

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 group 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

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 group using az configure --defaults workspace=<name>.

Optional Parameters

--local

List local deployment under this local endpoint.

accepted values: false, true

az ml online-deployment show

Show a deployment.

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

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 group using az configure --defaults workspace=<name>.

Optional Parameters

--local

Show local deployment from Docker environment.

accepted values: false, true

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}]
                               [--name]
                               [--no-wait]
                               [--remove]
                               [--set]
                               [--vscode-debug {false, true}]

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

--endpoint-name -e

Name of the online endpoint.

--file -f

Local path to the YAML file containing the Azure ML deployment specification.

--force-string

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

--local

Update local deployment in Docker environment.

accepted values: false, true
--name -n

Name of the deployment.

--no-wait

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

--remove

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

--set

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

--vscode-debug

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

accepted values: false, true