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
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>
.
Optional Parameters
Sets endpoint traffic 100% to this deployment after successful creation, does not work with --no-wait.
Name of the online endpoint.
Create deployment locally using Docker. Only one deployment per endpoint is allowed. Note: If specified endpoint doesn't exist, it will be created.
Enable GPU for local deployment.
Name of the deployment.
Do not wait for the long-running operation to finish.
[THIS IS IN PREVIEW] Create packaged environment from the deployment yaml and use the packaged environment for the deployment.
Update an object by specifying a property path and value to set. Example: --set property1.property2=.
Allows user to bypass deployment scoring script validation.
Create local endpoint and attach VSCode debugger. Only works with --local flag.
Show the deployment's details in Azure ML studio in a web browser.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of the online endpoint.
Name of the deployment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>
.
Optional Parameters
Delete local deployment from Docker environment.
Do not wait for the long-running operation to finish.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of the online endpoint.
Name of the deployment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>
.
Optional Parameters
The type of container from which to retrieve logs. Allowed values: inference-server, storage-initializer.
The maximum number of lines to tail.
Get logs from local deployment in Docker environment.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of the endpoint.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>
.
Optional Parameters
List local deployment under this local endpoint.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of the online endpoint.
Name of the deployment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>
.
Optional Parameters
Show local deployment from Docker environment.
Show the deployment's details in Azure ML studio in a web browser.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure ML workspace. You can configure the default workspace using az configure --defaults workspace=<name>
.
Optional Parameters
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>
.
Name of the online endpoint.
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.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Update local deployment in Docker environment.
Enable GPU for local deployment.
Name of the deployment.
Do not wait for the long-running operation to finish.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Allows user to bypass deployment scoring script validation.
Update local endpoint and re-attach VSCode debugger. Only works with --local flag.
Show the deployment's details in Azure ML studio in a web browser.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI