ResourcePath#

The following are the resource paths available in Olive.

ResourceType#

class olive.resource_path.ResourceType(value)[source]#

An enumeration.

AzureMLDatastore = 'azureml_datastore'#
AzureMLJobOutput = 'azureml_job_output'#
AzureMLModel = 'azureml_model'#
AzureMLRegistryModel = 'azureml_registry_model'#
LocalFile = 'file'#
LocalFolder = 'folder'#
StringName = 'string_name'#

Each resource path is followed by a description of the path and a list of the its configuration options.

LocalFile#

Local file resource path.

path#

Path to the resource.

type: pathlib.Path | str

required: True

LocalFolder#

Local folder resource path.

path#

Path to the resource.

type: pathlib.Path | str

required: True

StringName#

String name resource path.

name#

Name of the resource.

type: str

required: True

AzureMLModel#

AzureML Model resource path.

azureml_client#

AzureML client config.

type: olive.azureml.azureml_client.AzureMLClientConfig

required: True

name#

Name of the model.

type: str

required: True

version#

Version of the model.

type: int | str

required: True

AzureMLClientConfig

pydantic settings olive.azureml.azureml_client.AzureMLClientConfig[source]#

Configuration for AzureMLClient.

This class is used to create an MLClient instance for AzureML operations. Some fields like read_timeout, max_operation_retries, operation_retry_interval are used to control the behavior of azureml operations like resource creation or download.

field subscription_id: str = None#

Azure subscription id. Required if aml_config_path is not provided.

field resource_group: str = None#

Azure resource group. Required if aml_config_path is not provided.

field workspace_name: str = None#

Azure workspace name. Required if aml_config_path is not provided.

field aml_config_path: str = None#

Path to AzureML config file. If provided, other fields are ignored.

field read_timeout: int = 60#

Read timeout in seconds for HTTP requests.

field max_operation_retries: int = 3#

Max number of retries for AzureML operations like resource creation or download.

field operation_retry_interval: int = 5#

Initial interval in seconds between retries for AzureML operations like resource creation or download. The interval doubles after each retry.

field default_auth_params: Dict[str, Any] | None = None#

Default auth config for AzureML client. Please refer to https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python#parameters for more details.

field keyvault_name: str | None = None#

Name of the keyvault to use. If provided, the keyvault will be used to retrieve secrets.

get_workspace_config() Dict[str, str][source]#

Get the workspace config as a dict.

create_client()[source]#

Create an MLClient instance.

create_registry_client(registry_name: str)[source]#

Create an MLClient instance.

AzureMLDatastore#

AzureML DataStore resource path.

azureml_client#

AzureML client config.

type: olive.azureml.azureml_client.AzureMLClientConfig

default_value: None

datastore_name#

Name of the datastore.

type: str

default_value: None

relative_path#

Relative path to the resource.

type: str

default_value: None

datastore_url#

URL of the datastore.

type: str

default_value: None

AzureMLJobOutput#

AzureML job output resource path.

azureml_client#

AzureML client config.

type: olive.azureml.azureml_client.AzureMLClientConfig

required: True

job_name#

Name of the job.

type: str

required: True

output_name#

Name of the output.

type: str

required: True

relative_path#

Relative path to the resource.

type: str

required: True