aistore.sdk.dataset.data_attribute

View as Markdown

Module Contents

Classes

NameDescription
DataAttributeHandles data attributes for datasets, managing the retrieval of attribute data from files

API

class aistore.sdk.dataset.data_attribute.DataAttribute(
path: pathlib.Path,
name: str,
file_type: str
)

Bases: ConfigAttribute

Handles data attributes for datasets, managing the retrieval of attribute data from files

Parameters:

path
Path

The file path where the attribute data is stored

name
str

The name of the attribute, used as a reference and identifier in the dataset

file_type
str

The type of file that stores the attribute data (e.g., ‘jpg’, ‘png’, ‘csv’)

aistore.sdk.dataset.data_attribute.DataAttribute.get_data_for_entry(
filename: str
) -> typing.Tuple[str, any]

Get the data for a given filename

Parameters:

filename
str

The name of the file to retrieve data for

Returns: Tuple[str, any]

Tuple[str, any]: A tuple containing the sample key and the data for the given filename