cellmap_flow.dashboard.routes.pipeline
The dashboard’s chain, and the settings the pipeline builder keeps here.
PUT /api/pipeline: set the chain and redraw the viewer through it (the dashboard page’s Submit, and the pipeline builder after each edit).POST /api/processandPOST /api/pipeline/apply: the two routes it replaced, kept for one release as its deprecated aliases./api/blockwise-config: the builder’s blockwise settings./update/equivalences: a segmentation layer’s merged ids.
Attributes
Classes
The pipeline builder's canvas as it sends it: its nodes by type, and |
|
The body of PUT /api/pipeline. |
Functions
|
/api/pipeline/apply's check of the builder's nodes: |
Show a merging postprocessor's merged ids (an Equivalences) in its |
|
Set the chain, and redraw the viewer through it. |
|
|
Submit's route before PUT /api/pipeline. |
The pipeline builder's route before PUT /api/pipeline, answering as it did. |
|
Get or set the blockwise settings. |
Module Contents
- cellmap_flow.dashboard.routes.pipeline.logger
- cellmap_flow.dashboard.routes.pipeline.pipeline_bp
- cellmap_flow.dashboard.routes.pipeline.validate_pipeline_config(config)
/api/pipeline/apply’s check of the builder’s nodes:
{"valid": True}, or{"valid": False, "error"}for the first node that names no registered op, or for a body it cannot read.
- class cellmap_flow.dashboard.routes.pipeline.BuilderCanvas(/, **data: Any)
The pipeline builder’s canvas as it sends it: its nodes by type, and its edges, each a list (a missing one is empty). The dashboard keeps it for the builder’s next load, and each model node’s
configfor a model node that comes back without one; the chain is not read from it.- inputs: list[dict] = []
- outputs: list[dict] = []
- edges: list[dict] = []
- normalizers: list[dict] = []
- models: list[dict] = []
- postprocessors: list[dict] = []
- class cellmap_flow.dashboard.routes.pipeline.PipelineUpdate(/, **data: Any)
The body of PUT /api/pipeline.
input_normandpostprocessare the two chains, each a list of{"name": <op class>, **its parameters}steps in the order they run (pipeline_spec’s form). Both are required,[]for none, and every step must name a registered op of its kind.builderis the pipeline builder’s canvas (BuilderCanvas); only the builder sends it.- input_norm: list[dict]
- postprocess: list[dict]
- builder: BuilderCanvas | None = None
- cellmap_flow.dashboard.routes.pipeline.update_equivalences()
Show a merging postprocessor’s merged ids (an Equivalences) in its segmentation layer. Its inference server posts them as it merges.
- cellmap_flow.dashboard.routes.pipeline.put_pipeline()
Set the chain, and redraw the viewer through it.
The body is a PipelineUpdate. The answer is
{"success": true, "pipeline": {"input_norm", "postprocess"}, "digest", "layers"}: the chain as it is now configured, its digest (which names the layers’ source, so the same chain sent again leaves neuroglancer’s chunks and each server’s built chain as they are), and the prediction layers drawn. A body that is not a PipelineUpdate, or a step its op’s class refuses, is a 400{"success": false, "error"}that changes nothing.
- cellmap_flow.dashboard.routes.pipeline.process()
Submit’s route before PUT /api/pipeline.
The body is
{"input_norm", "postprocess"}, either chain in the list or the older dict form. The answer is{"message", "received_data"}, the body with the dashboard’s address and the chain’s digest added; the older answer’sfound_custom_normalizerandreceived_data.time, which nothing read, are gone. An op it does not know is kept in the chain and skipped where it is built; a body without both chains, or a step its class refuses, is a 500.
- cellmap_flow.dashboard.routes.pipeline.apply_pipeline()
The pipeline builder’s route before PUT /api/pipeline, answering as it did.
The body is the builder’s nodes by type (
input_normalizers,postprocessors,models,inputs,outputs) and itsedges. The chain is taken from the normalizer and postprocessor nodes, each{"name", "params"}; everything is kept as the builder’s canvas. The answer is{"message", "normalizers_applied", "postprocessors_applied"}. A node that names no registered op is a 400{"valid": false, "error"}, and anything else that goes wrong a 500{"error"}.
- cellmap_flow.dashboard.routes.pipeline.blockwise_config_api()
Get or set the blockwise settings.