Add --curated-dir to soma reproduce to reuse a pre-curated manifest#274
Merged
Conversation
Curation is a deterministic raw -> manifest step that can cost minutes (HEST-bench IDC explodes ~35k spots to lossless PNGs), yet `soma reproduce` re-ran it on every invocation. Add `--curated-dir DIR` as a third manifest source alongside `--raw-root` (curate from raw) and `--from-run-dir` (re-score an existing run): it points the pipeline straight at an existing dataset.csv + splits.csv and skips curation entirely. Chosen over silently reusing an already-populated --out-dir: an explicit flag keeps the "this manifest is good, don't re-derive it" assertion with the caller and never picks up a stale manifest without a signal. It is dataset-type-agnostic (the spatial_expression targets.npy / genes.json sidecars are resolved by the Manifest loader relative to dataset.csv), nests per-member under family fan-out, fails fast when the dir is not a manifest, and yields to --from-run-dir when both are given.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
--curated-dir DIRtosoma reproduceas a third manifest source alongside--raw-root(curate from raw) and--from-run-dir(re-score an existing run). When given, it points the pipeline straight at an existingdataset.csv+splits.csvand skips curation entirely.Why
Curation is a deterministic
raw -> manifeststep that can cost minutes — the HEST-bench IDC task explodes ~35k spots to lossless PNGs — yetsoma reproducere-ran it on every invocation. This bit during the manualhest/IDCuni2 reproduction, where the same validated manifest was re-derived on each run.--curated-dirlets you curate once and reuse across seeds/encoders.Design
Chosen over silently reusing an already-populated
--out-dir: an explicit flag keeps the "this manifest is good, don't re-derive it" assertion with the caller and never picks up a stale manifest without a signal. The flag is:spatial_expressiontargets.npy/genes.jsonsidecars are resolved by the Manifest loader relative todataset.csv, so it needs no per-benchmark knowledge;eva,hest);--from-run-dirwhen both are given.Tests
tests/test_benchmarks_cli.py: +3 (skip-curation, missing-manifest error, three-mode error message)docs/cli.rstregenerated frombuild_cli_rst(); docs-sync + Sphinx build greentest_benchmarks_cli.py+test_docs.py: 41 passed