az ml batch-endpoint

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 batch-endpoint command. Learn more about extensions.

Manage Azure ML batch endpoints.

Azure ML endpoints provide a simple interface for creating and managing model deployments. Each endpoint can have one or more deployments. Batch endpoints are used for offline batch scoring.

Commands

Name Description Type Status
az ml batch-endpoint create

Create an endpoint.

Extension GA
az ml batch-endpoint delete

Delete an endpoint.

Extension GA
az ml batch-endpoint invoke

Invoke an endpoint.

Extension GA
az ml batch-endpoint list

List endpoints in a workspace.

Extension GA
az ml batch-endpoint list-jobs

List the batch scoring jobs for a batch endpoint.

Extension GA
az ml batch-endpoint show

Show details for an endpoint.

Extension GA
az ml batch-endpoint update

Update an endpoint.

Extension GA

az ml batch-endpoint create

Create an endpoint.

To create an endpoint, provide a YAML file with a batch endpoint configuration. If the endpoint already exists, it will be over-written with the new settings.

az ml batch-endpoint create --resource-group
                            --workspace-name
                            [--file]
                            [--name]
                            [--no-wait]
                            [--set]

Examples

Create an endpoint from a YAML specification file

az ml batch-endpoint create --file endpoint.yml --resource-group my-resource-group --workspace-name my-workspace

Create an endpoint with name

az ml batch-endpoint create --name endpointname --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

--file -f

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

--name -n

Name of the batch endpoint.

--no-wait

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

default value: False
--set

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

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 batch-endpoint delete

Delete an endpoint.

az ml batch-endpoint delete --name
                            --resource-group
                            --workspace-name
                            [--no-wait]
                            [--yes]

Examples

Delete an batch endpoint, including all its deployments

az ml batch-endpoint delete --name my-batch-endpoint --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--name -n

Name of the batch 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

--no-wait

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

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 batch-endpoint invoke

Invoke an endpoint.

You can start batch inference run by invoking the endpoint with some data. For batch endpoints, invocation will trigger an asynchronous batch scoring job.

az ml batch-endpoint invoke --name
                            --resource-group
                            --workspace-name
                            [--deployment-name]
                            [--experiment-name]
                            [--file]
                            [--input]
                            [--input-type]
                            [--inputs]
                            [--instance-count]
                            [--job-name]
                            [--mini-batch-size]
                            [--output-path]
                            [--outputs]
                            [--set]

Examples

Invoke a batch endpoint with input data from a registered Azure ML data asset and override default deployment setting for mini_batch_size

az ml batch-endpoint invoke --name my-batch-endpoint --input azureml:my-dataset:1 --mini-batch-size 64 --resource-group my-resource-group --workspace-name my-workspace

Invoke a batch endpoint with input file from a public URI

az ml batch-endpoint invoke --name my-batch-endpoint --input-type uri_file --input https://pipelinedata.blob.core.windows.net/sampledata/mnist/0.png --resource-group my-resource-group --workspace-name my-workspace

Invoke a batch endpoint with input file from a registered datastore

az ml batch-endpoint invoke --name my-batch-endpoint --input-type uri_file --input azureml://datastores/workspaceblobstore/paths/{path_to_data}/mnist/0.png --resource-group my-resource-group --workspace-name my-workspace

Invoke a batch endpoint with input folder from a public URI

az ml batch-endpoint invoke --name my-batch-endpoint --input-type uri_folder --input https://pipelinedata.blob.core.windows.net/sampledata/mnist --resource-group my-resource-group --workspace-name my-workspace

Invoke a batch endpoint with input folder from a registered datastore

az ml batch-endpoint invoke --name my-batch-endpoint --input-type uri_folder --input azureml://datastores/workspaceblobstore/paths/{path_to_data}/mnist --resource-group my-resource-group --workspace-name my-workspace

Invoke a batch endpoint with files in a local folder

az ml batch-endpoint invoke --name my-batch-endpoint --input ./mnist_folder --resource-group my-resource-group --workspace-name my-workspace

Invoke a batch endpoint with a local folder as the input and output path and overwrite some batch deployment settings during endpoint invoke

az ml batch-endpoint invoke --name my-batch-endpoint --input ./mnist_folder --instance-count 2 --mini-batch-size 5 --output-path azureml://datastores/workspaceblobstore/paths/tests/output --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--name -n

Name of the batch 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

--deployment-name -d

Name of the deployment to target.

--experiment-name

Name of the experiment for pipeline component deployment.

--file -f

Name of the file used for batch invoke.

--input

Reference to input data to use for batch inferencing. It can be a path on the datastore, public URI, a registered data asset, or a local folder path.

--input-type

Type of the input, specifying whether it's a file or a folder. Use this when you are using a path on datastore or public URI. Supported values: uri_folder, uri_file.

--inputs

Dictionary of Inputs of invoke jobs.

--instance-count -c

Number of instances the prediction will run on.

--job-name

Name of the job for batch invoke.

--mini-batch-size -m

Size of each mini batch that the input data will be split into for prediction.

--output-path

Path on the datastore where output files will be uploaded to.

--outputs

Dictionary to specify where to store the results.

--set

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

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 batch-endpoint list

List endpoints in a workspace.

az ml batch-endpoint list --resource-group
                          --workspace-name

Examples

List all the batch endpoints in a workspace

az ml batch-endpoint list --resource-group my-resource-group --workspace-name my-workspace

List all the batch endpoints in a workspace

az ml batch-endpoint list  --resource-group my-resource-group --workspace-name my-workspace

List all the batch endpoints in a workspace using --query argument to execute a JMESPath query on the results of commands.

az ml batch-endpoint list --query "[].{Name:name}"  --output table --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>.

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 batch-endpoint list-jobs

List the batch scoring jobs for a batch endpoint.

az ml batch-endpoint list-jobs --name
                               --resource-group
                               --workspace-name

Examples

List all the batch scoring jobs for an endpoint

az ml batch-endpoint list-jobs --name my-batch-endpoint --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--name -n

Name of the batch 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>.

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 batch-endpoint show

Show details for an endpoint.

az ml batch-endpoint show --name
                          --resource-group
                          --workspace-name

Examples

Show the details for a batch endpoint

az ml batch-endpoint show --name my-batch-endpoint  --resource-group my-resource-group --workspace-name my-workspace

Show the provisioning state of an endpoint using --query argument to execute a JMESPath query on the results of commands.

az ml batch-endpoint show -n my-endpoint --query "{Name:name,State:provisioning_state}"  --output table --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--name -n

Name of the batch 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>.

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 batch-endpoint update

Update an endpoint.

The 'description', 'tags', and 'defaults' properties of an endpoint can be updated. In addition, new deployments can be added to an endpoint, and existing deployments can be updated.

az ml batch-endpoint update --resource-group
                            --workspace-name
                            [--add]
                            [--defaults]
                            [--file]
                            [--force-string]
                            [--name]
                            [--no-wait]
                            [--remove]
                            [--set]

Examples

Update an endpoint from a YAML specification file

az ml batch-endpoint update --name my-batch-endpoint --file updated_endpoint.yml --resource-group my-resource-group --workspace-name my-workspace

Add a new deployment to an existing endpoint

az ml batch-endpoint update --name my-batch-endpoint  --set defaults.deployment_name=depname  --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: []
--defaults

Update deployment_name inside defaults settings for endpoint invoke.

--file -f

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

--force-string

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

default value: False
--name -n

Name of the batch endpoint.

--no-wait

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

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: []
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.