modelrunner.storage.utils module
Functions and classes that are used commonly used by the storage classes.
- class Array(input_array, attrs=None)[source]
Bases:
ndarrayNumpy array augmented with attributes.
- Parameters:
attrs (Attrs | None)
- decode_binary(obj_str)[source]
Decode an object encoded with
encode_binary().
- decode_class(class_path, *, guess=None)[source]
Decode a class encoded with
encode_class().
- encode_binary(obj: Any, *, binary: Literal[True]) bytes[source]
- encode_binary(obj: Any, *, binary: Literal[False]) str
Encodes an arbitrary object as a string.
The object can be decoded using
decode_binary().
- encode_class(cls)[source]
Encode a class such that it can be restored.
The class can be decoded using
decode_class().