Shortcuts

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 to unzip: the resulting directory can be passed to load_memmap() or memory-mapped into in-place.

Parameters:
  • archive_path (str or Path) – path to an archive produced by pack_memmap() or save().

  • prefix (str or Path) – directory where the content should be extracted.

Returns:

the path to the directory.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources