unpack_memmap¶
- class tensordict.unpack_memmap(archive_path: str | pathlib.Path, prefix: str | pathlib.Path)¶
Extracts a memmap tensordict archive into a memmap directory.
This is the inverse of
pack_memmap()and is equivalent tounzip: the resulting directory can be passed toload_memmap()or memory-mapped into in-place.- Parameters:
archive_path (str or Path) – path to an archive produced by
pack_memmap()orsave().prefix (str or Path) – directory where the content should be extracted.
- Returns:
the path to the directory.