IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Python function

msgpack_numpy_oob_encoder

msgpack_numpy_oob_encoder()

max.pipelines.modeling.types.msgpack_numpy_oob_encoder(oob_threshold=65536)

source

Create an out-of-band (zero-copy) msgpack encoder for numpy arrays.

Parameters:

oob_threshold (int) – Minimum array size in bytes to send out-of-band. Smaller arrays are encoded inline.

Returns:

A pickleable encoder whose __call__ returns a list of transport frames (see _MsgpackNumpyOOBEncoder).

Return type:

_MsgpackNumpyOOBEncoder