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 class

CheckpointerFactory

CheckpointerFactory​

class max.pipelines.kv_cache.checkpoint.CheckpointerFactory

source

Bases: object

Builds a checkpointer once every query its context needs is provided.

build()​

build()

source

Returns the checkpointer.

Raises:

ValueError – If the checkpointer is enabled and lacks a candidate query.

Return type:

Checkpointer

disabled()​

disabled()

source

Makes the checkpointer drop every event.

Return type:

Self

with_candidate_at_or_before()​

with_candidate_at_or_before(query)

source

Sets the query that answers the context’s candidates.

Parameters:

query (Callable[[RequestID, int], int | None])

Return type:

Self

with_heuristics()​

with_heuristics(*heuristics)

source

Adds heuristics for the checkpointer to run.

Parameters:

heuristics (Heuristic)

Return type:

Self