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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Sets endpoint traffic 100% to this deployment after successful creation, does not work with --no-wait.
Property | Value |
---|---|
Default value: | False |
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.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Enable GPU for local deployment.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Name of the deployment.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
[THIS IS IN PREVIEW] Create packaged environment from the deployment yaml and use the packaged environment for the deployment.
Property | Value |
---|---|
Default value: | False |
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.
Property | Value |
---|---|
Default value: | False |
Create local endpoint and attach VSCode debugger. Only works with --local flag.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Show the deployment's details in Azure ML studio in a web browser.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Delete local deployment from Docker environment.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
Do not prompt for confirmation.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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 following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The type of container from which to retrieve logs. Allowed values: inference-server, storage-initializer.
The maximum number of lines to tail.
Property | Value |
---|---|
Default value: | 5000 |
Get logs from local deployment in Docker environment.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
List local deployment under this local endpoint.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Show local deployment from Docker environment.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Show the deployment's details in Azure ML studio in a web browser.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
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.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | False |
Update local deployment in Docker environment.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Enable GPU for local deployment.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Name of the deployment.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Allows user to bypass deployment scoring script validation.
Property | Value |
---|---|
Default value: | False |
Update local endpoint and re-attach VSCode debugger. Only works with --local flag.
Property | Value |
---|---|
Default value: | False |
Accepted values: | false, true |
Show the deployment's details in Azure ML studio in a web browser.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |