Command line
CellMap Flow has one command, cellmap_flow, with a subcommand for each
job. cellmap_flow <command> --help lists a command’s options, and
--log-level before the command sets how much it logs (INFO by default):
cellmap_flow view -d /path/to/data.zarr
cellmap_flow --log-level DEBUG yaml config.yaml
Before 0.3.0 most of these were separate programs (cellmap_flow_yaml and
the rest). Those names still work in 0.3.0; see Deprecated names.
Commands
Command |
What it does |
|---|---|
|
Start one model’s inference server, then open the viewer on its
predictions and serve the dashboard. There is a subcommand for each
model type ( |
|
The same for every model a YAML file lists, with its normalization
and postprocessing (YAML Configuration). |
|
Print the model entry for a path, URL, Hugging Face repo, zoo nickname
or Cellpose model name, as YAML for a config’s |
|
Open a dataset in the viewer and serve the dashboard, where models are
picked and submitted. |
|
Serve the dashboard on its own, for a viewer already running
( |
|
Run a model over a whole volume, block by block, writing its
predictions to disk (YAML Configuration). Several YAMLs run one after
another; the command fails at the end if any left blocks unprocessed.
|
|
Serve one model’s predictions. The launchers ( |
|
The finetune tools ( |
|
List the model types and the arguments each takes. |
|
Manage plugins (Plugins). |
|
Check the environment: what is installed, what is missing, and the
command that fixes each gap. |
Starting a server
A launcher starts each model’s server as an LSF job (or a local process
where there is no bsub) with:
$CELLMAP_FLOW_SERVER_COMMAND --model '<entry>' -d <data path>
The entry is the model as a YAML model entry, in JSON
(ModelConfig.launch_entry), and the server builds the model from it as
cellmap_flow yaml builds a YAML’s models:
cellmap_flow serve -d /path/to/data.zarr/raw \
--model '{"type": "script", "script_path": "/path/to/model.py", "name": "mito"}'
A launcher always adds --resample or --no-resample (infer
--no-resample, resample: false in a YAML, the dashboard’s box), so
the server reads the data as its launcher was told to; see Data at Another Voxel Size.
CELLMAP_FLOW_SERVER_COMMAND is cellmap_flow serve by default. A
deployment whose environment is not on the compute nodes’ PATH sets it:
the pixi environment sets pixi run cellmap_flow serve
(Installation). The value before 0.3.0, pixi run cellmap_flow_server,
still works, since cellmap_flow_server takes --model too.
Plugins
Every command loads the registered plugins (~/.cellmap_flow/plugins/)
when it starts, so a plugin’s model type has its infer and serve
form and its normalizers and postprocessors are offered in the dashboard.
Importing cellmap_flow does not load them: a script that uses a plugin’s
classes calls cellmap_flow.plugins.load_plugins() first.
Deprecated names
These still work in 0.3.0 and go in the release after it. Each prints, on
stderr, `<old>` is deprecated and goes in the release after 0.3.0; use
`<new>`. and then does what <new> does.
Before 0.3.0 |
Since 0.3.0 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|