plaid.storage.backend_api¶
plaid.storage.backend_api
¶
Protocol definition for storage backend modules.
plaid.storage.backend_api.BackendModule
¶
Protocol describing required methods for storage backend plugins.
plaid.storage.backend_api.BackendModule.init_from_disk
staticmethod
¶
plaid.storage.backend_api.BackendModule.download_from_hub
staticmethod
¶
Download a dataset dictionary from a remote hub into a local folder.
Source code in plaid/storage/backend_api.py
plaid.storage.backend_api.BackendModule.init_datasetdict_streaming_from_hub
staticmethod
¶
Initialize a streaming dataset dictionary from a remote hub.
Source code in plaid/storage/backend_api.py
plaid.storage.backend_api.BackendModule.generate_to_disk
staticmethod
¶
generate_to_disk(
output_folder,
generators,
variable_schema=None,
gen_kwargs=None,
num_proc=1,
verbose=False,
)
Generate and save a dataset dictionary to local storage.
Source code in plaid/storage/backend_api.py
plaid.storage.backend_api.BackendModule.push_local_to_hub
staticmethod
¶
Push a local dataset dictionary to a remote hub repository.
plaid.storage.backend_api.BackendModule.configure_dataset_card
staticmethod
¶
configure_dataset_card(
repo_id,
infos,
local_dir=None,
viewer=False,
pretty_name=None,
dataset_long_description=None,
illustration_urls=None,
arxiv_paper_urls=None,
)
Configure metadata for a dataset card associated with a repository.
Source code in plaid/storage/backend_api.py
plaid.storage.backend_api.BackendModule.to_var_sample_dict
staticmethod
¶
Convert a backend sample to PLAID variable-sample dictionary representation.
Source code in plaid/storage/backend_api.py
plaid.storage.backend_api.BackendModule.sample_to_var_sample_dict
staticmethod
¶
Convert a backend-native sample object to a variable-sample dictionary.