cellmap_flow.server

Attributes

logger

CHAIN_CACHE_SIZE

EQUIVALENCES_TIMEOUT_SECONDS

RAW_CACHE_BYTES_ENV

RAW_CACHE_BYTES_DEFAULT

RAW_READ_CONCURRENCY_ENV

HALF_PRECISION_ENV

Classes

ServedChain

The normalization/postprocessing a layer URL asks for.

CellMapFlowServer

Flask application hosting a "virtual Zarr" for Neuroglancer.

Functions

get_free_port()

A TCP port free on this machine now, for a server to bind.

get_public_ip()

Return the local/private IP address in use on this machine

Module Contents

cellmap_flow.server.logger
cellmap_flow.server.CHAIN_CACHE_SIZE = 32
cellmap_flow.server.EQUIVALENCES_TIMEOUT_SECONDS = 10
cellmap_flow.server.RAW_CACHE_BYTES_ENV = 'CELLMAP_FLOW_RAW_CACHE_BYTES'
cellmap_flow.server.RAW_CACHE_BYTES_DEFAULT = 1073741824
cellmap_flow.server.RAW_READ_CONCURRENCY_ENV = 'CELLMAP_FLOW_RAW_READ_CONCURRENCY'
cellmap_flow.server.HALF_PRECISION_ENV = 'CELLMAP_FLOW_HALF_PRECISION'
cellmap_flow.server.get_free_port()

A TCP port free on this machine now, for a server to bind.

cellmap_flow.server.get_public_ip()

Return the local/private IP address in use on this machine (e.g., 10.x.x.x or 192.168.x.x if behind NAT). This does not return the real Internet-facing public IP if you’re behind NAT.

class cellmap_flow.server.ServedChain

The normalization/postprocessing a layer URL asks for.

dashboard_url: str | None
input_norms: list | None
postprocess: list | None
effective_postprocess()
class cellmap_flow.server.CellMapFlowServer(dataset_name: str, model_config: cellmap_flow.models.models_config.ModelConfig, restart_callback=None, restart_token=None, resample=False)

Flask application hosting a “virtual Zarr” for Neuroglancer. All routes are defined via Flask decorators for convenience.

inferencer
geometry
input_voxel_size
output_voxel_size
output_channels
output_dtype
restart_callback = None
restart_token = None
idi_raw
origin
axes
has_channel
refresh_rate_seconds = 5
previous_refresh_time = 0
chunk_encoder
app
chain_for(dataset) → ServedChain

The chain the requested layer URL carries, built once per URL.

A URL without an args block gets the process’s chain (process_chain(), empty in a server started from the CLI).

CHUNKS_TIMED_AT_INFO = 20
run(debug=False, port=None, certfile=None, keyfile=None)

Run the Flask dev server with optional SSL certificate.