AzureMachineLearningFileSystem Class

Access Azure Machine Learning defined URI as if it were a file system. This exposes a filesystem-like API on top of Azure Machine Learning defined URI

Initialize a new AzureMachineLearningFileSystem object

Inheritance
fsspec.asyn.AsyncFileSystem
AzureMachineLearningFileSystem

Constructor

AzureMachineLearningFileSystem(*args, **kwargs)

Parameters

Name Description
uri
Required
str

Azure Machine Learning defined URI Supports both datastore URIs, data asset URIs, and registry URIs.

  1. Datastore URI Format: "azureml://subscriptions/{subscription_id}/resourcegroups/{resource_group}/ [providers/Microsoft.MachineLearningServices/]workspaces/{workspace}/datastores/{datastore_name}/[paths/{path}]"

Where:

  • {subscription_id} is the ID of the Azure subscription.
  • {resource_group} is the name of the Azure resource group.
  • {workspace} is the name of the Azure Machine Learning workspace.
  • {datastore_name} is the name of the datastore.
  • [paths/{path}] is an optional segment representing the path within the datastore.
  1. Data Asset URI Format: "azureml://subscriptions/{subscription_id}/resourcegroups/{resource_group}/ [providers/Microsoft.MachineLearningServices/]workspaces/{workspace}/data/{data_name}/[versions/{version}]"

Where:

  • {subscription_id}, {resource_group}, and {workspace} have the same meanings as above.
  • {data_name} is the name of the data asset.
  • [versions/{version}] is an optional segment representing the version of the data asset.

Note: The segment "providers/Microsoft.MachineLearningServices/" is optional in both URI formats. We support URIs both with and without this segment.

  1. Registry URI Format: "azureml://registries/{registry_name}/data/{data_name}/versions/{version}"
uri
Required
str

the uri to initialize AzureMachineLearningFileSystem.

Remarks

This will enable pandas/dask to load Azure Machine Learning defined URI.

Methods

get

Copy file(s) to local.

glob

globbing result for the uri

put

Copy file(s) to local.

to_absolute_path

Convert relative path in filesystem root to absolute path

get

Copy file(s) to local.

get(rpath, lpath, recursive=False, callback=<fsspec.callbacks.NoOpCallback object>, **kwargs)

glob

globbing result for the uri

glob(path=None, **kwargs)

Parameters

Name Description
path
Required
str

path to glob, it can be long form datastore uri or just relative path in the format of {datastore}/{relative_path}

Returns

Type Description

A list of file paths

put

Copy file(s) to local.

put(lpath, rpath, recursive=False, callback=<fsspec.callbacks.NoOpCallback object>, **kwargs)

to_absolute_path

Convert relative path in filesystem root to absolute path

static to_absolute_path(path: str)

Parameters

Name Description
path
Required

Attributes

protocol

protocol: ClassVar[str | tuple[str, ...]] = 'azureml'