TensorPlay
Reference guides
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-08

tensorplay.serialization

Classes

Functions

Format Constants

The serializer identifies its files with a magic number and a protocol version in the header. Payloads are pickled with tensorplay.serialization.DEFAULT_PROTOCOL unless save(..., pickle_protocol=...) says otherwise, and storages inside mega archives are aligned to tensorplay.serialization.DEFAULT_ALIGNMENT bytes unless save(..., alignment=...) says otherwise. A mega archive is a directory whose name ends with tensorplay.serialization.MEGA_EXTENSION, holding an index file ending with tensorplay.serialization.MEGA_INDEX_SUFFIX next to the serialized data.

  • tensorplay.serialization.MAGIC_NUMBER — the magic value every archive starts with; loaders reject files whose header does not match it.

  • tensorplay.serialization.PROTOCOL_VERSION — the header protocol version.

  • tensorplay.serialization.DEFAULT_PROTOCOL — default pickle protocol for the payload.

  • tensorplay.serialization.DEFAULT_ALIGNMENT — default byte alignment for storages written into mega archives.

  • tensorplay.serialization.MEGA_EXTENSION — file suffix of a mega archive.

  • tensorplay.serialization.MEGA_INDEX_SUFFIX — file suffix of a mega archive’s index document.

On this page

Ask DeepWiki