DatacacheStore Class

Note

This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.

Represents a storage abstraction over an Azure Machine Learning storage account.

DatacacheStores are attached to workspaces and are used to store information related to the underlying datacache solution. Currently, only partitioned blob solution is supported. Datacachestores defines various Blob datastores that could be used for caching.

Use this class to perform management operations, including register, list, get, and update datacachestores. DatacacheStores for each service are created with the register* methods of this class.

Get a datacachestore by name. This call will make a request to the datacache service.

Inheritance
builtins.object
DatacacheStore

Constructor

DatacacheStore(workspace, name, **kwargs)

Parameters

Name Description
workspace
Required

The workspace.

name
Required
str

The name of the datacachestore

Methods

get_by_name

Get a datacachestore by name.

list

List all the datacachestores in the workspace.

register

Register a datacachestore to the workspace.

update

Update datacache policy for a datacachestore.

get_by_name

Get a datacachestore by name.

static get_by_name(workspace, name)

Parameters

Name Description
workspace
Required

The workspace.

name
Required
str

The name of the datacachestore

Returns

Type Description

The corresponding datastore for that name.

list

List all the datacachestores in the workspace.

static list(workspace)

Parameters

Name Description
workspace
Required

The workspace.

Returns

Type Description

List of DatacacheStore objects.

register

Register a datacachestore to the workspace.

static register(workspace, name, data_store_list, data_management_compute_target, data_management_compute_auth, ttl_in_days, ttl_expiration_policy, default_replica_count, data_factory_resource_id=None, **kwargs)

Parameters

Name Description
workspace
Required

The workspace.

name
Required
Union[list(str), list(<xref:AbstractDataStore>)]

The name of the datacachestore.

data_store_list
Required

The list of underlying datastores.

data_management_compute_target
Required

The data management compute.

data_management_compute_auth
Required

The service principal used to submit data management jobs to data management compute.

ttl_in_days
Required
<xref:Int>

Time-To-Live in days.

ttl_expiration_policy
Required
str, <xref:one> of [<xref:"LastAccessTime">, <xref:"CreationTime">]

TTL expire policy.

default_replica_count
Required
<xref:Int>

Default number of replicas to hydrate.

data_factory_resource_id
<xref:str.>

Resource id of the ADF to be used for hydration.

default value: None

Returns

Type Description

The DatacacheStore object

update

Update datacache policy for a datacachestore.

static update(workspace, name, data_management_compute_target=None, data_management_compute_auth=None, ttl_in_days=None, ttl_expiration_policy=None, default_replica_count=None, data_factory_resource_id=None, **kwargs)

Parameters

Name Description
workspace
Required

The workspace.

name
Required
str

The name of the datacachestore.

data_management_compute_target

The data management compute.

default value: None
data_management_compute_auth

The service principal used to submit data management jobs to data management compute.

default value: None
ttl_in_days
<xref:Int>

Time-To-Live in days.

default value: None
ttl_expiration_policy
str, <xref:one> of [<xref:"LastAccessTime">, <xref:"CreationTime">]

TTL expire policy.

default value: None
default_replica_count
<xref:Int>

Default number of replicas to hydrate.

default value: None
data_factory_resource_id
<xref:str.>

Resource id of the ADF to be used for hydration.

default value: None

Returns

Type Description

The DatacacheStore object

Attributes

data_factory_resource_id

Return the resource id of the Azure data factory which can be used for hydration.

Returns

Type Description
str

Resource id of the ADF to be used for hydration.

data_management_compute_target

Return the name of the data management compute to be used for hydration.

Returns

Type Description
str

The data management compute.

data_store_list

Return the list of underlying datastores for the datacachestores.

Returns

Type Description
list(<xref:AbstractDataStore>)

The list of datastores to be used as datacachestores.

default_replica_count

Return the default number of replicas during hydration.

Returns

Type Description
Int

Default number of replicas to hydrate.

name

Return the name of the datacache store.

Returns

Type Description
str

The DatacacheStore name.

ttl_expiration_policy

Return the Time-to-live expiration policy.

Returns

Type Description
str

TTL expire policy.

ttl_in_days

Return the Time-to-live policy.

Returns

Type Description
Int

Time-To-Live in days.

workspace

Return the workspace information.

Returns

Type Description

The workspace.