Share via


az ml index

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

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Azure ML indexes.

Commands

Name Description Type Status
az ml index create

Create an index.

Extension Preview
az ml index list

List indexes in a workspace.

Extension Preview
az ml index show

Show details for an index in a workspace.

Extension Preview

az ml index create

Preview

Command group 'ml index' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create an index.

Indexes can be created from a local file, local directory, datastore or remote uri. The created index will be tracked in the workspace under the specified name and version.

az ml index create [--datastore]
                   [--description]
                   [--file]
                   [--name]
                   [--path]
                   [--registry-name]
                   [--resource-group]
                   [--set]
                   [--stage]
                   [--tags]
                   [--version]
                   [--workspace-name]

Examples

Create an index from a YAML specification file

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

Create an index from a path to a local folder

az ml index create --name my-index --version 1 --path ./my-index --resource-group my-resource-group --workspace-name my-workspace

Create an index from a path to a datastore

az ml index create --name my-index --version 1 --path azureml://datastores/myblobstore/paths/indexes/MLIndex --resource-group my-resource-group --workspace-name my-workspace

Optional Parameters

--datastore

The datastore to upload the local artifact to.

--description

Description of the index.

--file -f

Local path to the YAML file containing the Azure ML index specification. The YAML reference docs for index can be found at:.

--name -n

Name of the index.

--path -p

Path to the index file(s). This can be either a local or a remote location. If specified, --name/-n must also be provided.

--registry-name

If provided, the command will target the registry instead of a workspace. Hence resource group and workspace won't be required.

--resource-group -g

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

--set

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

--stage -s

Stage of the index.

--tags

Space-separated key-value pairs for the tags of the object.

--version -v

Version of the index.

--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 index list

Preview

Command group 'ml index' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List indexes in a workspace.

az ml index list [--max-results]
                 [--name]
                 [--registry-name]
                 [--resource-group]
                 [--workspace-name]

Examples

List all the indexes in a workspace

az ml index list --resource-group my-resource-group --workspace-name my-workspace

List all the index versions for the specified name in a workspace

az ml index list --name my-index --resource-group my-resource-group --workspace-name my-workspace

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

az ml index list --query "[].{Name:name}"  --output table --resource-group my-resource-group --workspace-name my-workspace

Optional Parameters

--max-results -r

Max number of results to return.

--name -n

Name of the index. If provided, all the index versions under this name will be returned.

--registry-name

If provided, the command will target the registry instead of a workspace. Hence resource group and workspace won't be required.

--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 index show

Preview

Command group 'ml index' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show details for an index in a workspace.

az ml index show --name
                 [--label]
                 [--registry-name]
                 [--resource-group]
                 [--version]
                 [--workspace-name]

Examples

Show details for an index with the specified name and version

az ml index show --name my-index --version 1 --resource-group my-resource-group --workspace-name my-workspace

Required Parameters

--name -n

Name of the index.

Optional Parameters

--label -l

Label of the index.

--registry-name

If provided, the command will target the registry instead of a workspace. Hence resource group and workspace won't be required.

--resource-group -g

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

--version -v

Version of the index.

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