brain_pipe.save.default.SaveMetadata¶
- class SaveMetadata(key_fn: ~typing.Callable[[~typing.Dict[str, ~typing.Any]], str] = <function default_metadata_key_fn>)¶
Bases:
AttachSave
,ABC
Abstract class for metadata to use when saving/reloading.
Attributes
FEATURE_NAME_STR
FILENAME_STR
OLD_FORMAT_STR
SET_NAME_STR
- __init__(key_fn: ~typing.Callable[[~typing.Dict[str, ~typing.Any]], str] = <function default_metadata_key_fn>)¶
Create a new SaveMetadata.
Methods
__init__
([key_fn])Create a new SaveMetadata.
add
(data_dict, filepath, feature_name, set_name)Add a metadata entry.
attach_saver
(saver)Initialize a new object with the saver.
clear
()Clear the metadata.
is_old_format
(metadata_item)Check if the metadata item is in the old format.
- abstract add(data_dict: Dict[str, Any], filepath: str, feature_name: str | None, set_name: str | None)¶
Add a metadata entry.
- abstract clear()¶
Clear the metadata.