You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(nextflow): integrate virtual-stain into mantis-v2 pipeline (#271)
* feat(nextflow): integrate virtual-stain into mantis-v2 pipeline
Recreate the Nextflow virtual-stain integration against the current
in-process cytoland CLI (post-#267), replacing the #259 approach which
was built on the old `viscy predict` + `--copy` temp-zarr flow.
- New `nextflow/modules/virtual_stain.nf`: init → preprocess → fan-out
per-position GPU prediction. Per-position work is a single
`biahub virtual-stain --cluster debug` call (no temp zarr, no --copy).
- `viscy preprocess` runs over the whole input plate to compute the
normalization statistics the model reads via read_norm_meta.
- Both `biahub virtual-stain` and `viscy` run under biahub's `stain`
extra (cytoland → viscy-utils provides the `viscy` console script).
- Add a `gpu` process label (queue=gpu) to nextflow.config.
- Wire virtual_stain_wf after reconstruct in mantis-v2.nf.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix biahub virtual-stain mem request
* refactor: unify per-position resource requests across step CLIs
Every step CLI (deskew, flat-field, apply-inv-tf, virtual-stain) now emits
its per-position resource request through a single shared helper,
biahub.cli.utils.echo_resources, as a JSON payload:
RESOURCES:{"cpus": 16, "mem_gb": 64, "time_min": 480}
The same (cpus, total mem_gb, time_min) values feed both the CLI's own
slurm_* submission args and, via parse_resources in nextflow, the Nextflow
per-position task directives — so the SLURM fan-out and the Nextflow fan-out
can no longer request different resources.
- Add echo_resources() and parse the JSON in common.nf::parse_resources,
which now returns time_min alongside cpus/mem_gb.
- Emit memory as a TOTAL (mem_gb) and request it via slurm_mem rather than
slurm_mem_per_cpu, fixing virtual-stain's per-cpu over-request.
- Wire each CLI's slurm_time from time_min; drop the hardcoded `time`
literals in the run_* processes for `meta.time_min * task.attempt`.
- virtual-stain computes time_min before the init_only return so --init
emits it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* payload bugfix
* debug viscy predict
* refactor: rename time_min to time_minutes for clarity
Avoids confusion with "minimum time"; renames the resource payload key
and Nextflow meta field consistently across both languages.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* update iohub dep
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments