cellmap_flow.serving.engine

Which inference server a process runs: chunkmirage’s or the Flask one.

CELLMAP_FLOW_ENGINE is chunkmirage (the default) or flask. Every place that starts a server (cellmap_flow serve, infer --server-check and the finetune loop) builds it with make_server, and both take the same arguments.

A model can run in an environment of its own (its env: a pixi environment, an alias or a path), which may not have chunkmirage. Unless chunkmirage was asked for, such a server is the Flask one, with a warning; the dashboard draws either server’s layers.

Attributes

logger

ENGINE_ENV

ENGINES

DEFAULT_ENGINE

Functions

engine_name(→ str)

name, else CELLMAP_FLOW_ENGINE, else the default; refused if unknown.

make_server(dataset_name, model_config, *[, engine])

The server for model_config over dataset_name; kwargs are

check_server(server)

Compute one chunk the way a request would: infer --server-check.

Module Contents

cellmap_flow.serving.engine.logger
cellmap_flow.serving.engine.ENGINE_ENV = 'CELLMAP_FLOW_ENGINE'
cellmap_flow.serving.engine.ENGINES = ('flask', 'chunkmirage')
cellmap_flow.serving.engine.DEFAULT_ENGINE = 'chunkmirage'
cellmap_flow.serving.engine.engine_name(name=None) → str

name, else CELLMAP_FLOW_ENGINE, else the default; refused if unknown.

cellmap_flow.serving.engine.make_server(dataset_name, model_config, *, engine=None, **kwargs)

The server for model_config over dataset_name; kwargs are CellMapFlowServer’s (restart_callback, restart_token, resample).

cellmap_flow.serving.engine.check_server(server)

Compute one chunk the way a request would: infer --server-check.