Storage¶
finalfusion.storage
|
Load any vocabulary from a finalfusion file. |
Load an array chunk from the given file. |
|
Array storage. |
|
Load a quantized array chunk from the given file. |
|
QuantizedArray storage. |
-
finalfusion.storage.
load_storage
(file: Union[str, bytes, int, os.PathLike], mmap: bool = False) → finalfusion.storage.storage.Storage[source]¶ Load any vocabulary from a finalfusion file.
Loads the first known vocabulary from a finalfusion file.
- Parameters
file (str) – Path to finalfusion file containing a storage chunk.
mmap (bool) – Toggles memory mapping the storage buffer as read-only.
- Returns
storage – First finalfusion Storage in the file.
- Return type
- Raises
ValueError – If the file did not contain a vocabulary.