IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Python function

bind_state_store

bind_state_store()​

max.pipelines.lib.module_registration.bind_state_store(decoder_cls, model_config, batch_processor, *, max_batch_size, devices)

source

Builds a registered decoder’s state store and gives it to the batcher.

Parameters:

  • decoder_cls (type[Any]) – The registered DECODER class.
  • model_config (Any) – The finalized config the decoder is built from.
  • batch_processor (object) – The pipeline model’s batch processor.
  • max_batch_size (int) – The most requests a step holds.
  • devices (Sequence[Device]) – The devices the decoder runs on.

Returns:

The store, or None when the decoder declares no state.

Raises:

TypeError – If the decoder declares state and the batch processor isn’t a DecoderBatchProcessor, which feeds it.

Return type:

RequestStateStore | None