specsrbench.build¶
Rebuilding the cache the figures read, from JADES DR4 and the Hub.
Six stages, each consuming what the one before it wrote:
predictions paired dataset + Hub checkpoints -> ML predictions
sets predictions -> eval / calib / tune sets, galaxy-disjoint
lsf raw JADES x1d + line fits -> the measured LSF kernel
tune tune set + kernel -> classical_params.json
classical eval set + kernel + parameters -> the classical caches
lines every reconstruction -> Gaussian fits, S/N, summary
Only lsf needs the raw JADES tree, and only predictions needs torch
and network access to the Hub; the rest run on what the earlier stages wrote.
The order matters in a way that is easy to get wrong. lsf reads the line
fits that lines writes, so the very first build of a fresh tree runs
lines once against the shipped kernel, then lsf, then tune ->
classical -> lines again on the measured one. classical refuses to
write a cache built with the shipped kernel, which is what stops that first
pass being mistaken for a finished one.
Module Attributes
stage name -> module implementing it. |
Functions
|
Load an input, or say which stage produces it. |
|
Run one build stage. |
- specsrbench.build.STAGES: dict[str, str] = {'classical': 'classical_cache', 'lines': 'lines', 'lsf': 'lsf', 'predictions': 'predictions', 'sets': 'sets', 'tune': 'tune'}¶
stage name -> module implementing it.
- specsrbench.build.run_stage(stage, args=None)[source]¶
Run one build stage.
argsis the parsed CLI namespace, if any.
- specsrbench.build.require_npz(path, produced_by)[source]¶
Load an input, or say which stage produces it.
A build stage that cannot find its input is the normal state of a fresh clone, not a corruption. Saying so, and naming the command that fixes it, is the difference between a one-line fix and an afternoon spent looking for a cache that was never there.