modelrunner.storage.backend.yaml module
Defines a class storing data in memory and writing it to a file in YAML format.
Requires the optional yaml module.
- class YAMLStorage(path, *, mode='read', simplify=True, **kwargs)[source]
Bases:
TextStorageBaseStorage that stores data in a YAML text file.
Note that the data is only written once the storage is closed.
- Parameters:
path (str or
Path) – File path to the filemode (str or
AccessMode) – The file mode with which the storage is accessed. Determines allowed operations.simplify (bool) – Flag indicating whether the data is stored in a simplified form
- encode_internal_attrs = True