Add P6 benchmark code, locked protocol_bench, T2 study and lock inputs

- ml_porosity/benchmark/ runner, scripts 32-35, scripts/run_bench.sh;
  misspec= option in synth_d2 (default path reproduces P2r bit for bit).
- configs/protocol_bench.{yaml,sha256,lock.json} locked 29/10 14:39 UTC
  (sha256 aa763f0a...), configs/d2_synth_bench.yaml.
- The eight protocol_bench inputs force-added from outputs/ (warp prior,
  wavelets, horizon cache, budgets) so load_protocol() and summarize work
  after a fresh clone. The 102 P2r reference artifacts (1.4 GB of particle
  npz) are not in git; they are only checked by posterior/train stages.
- T2 mechanism declaration and results; operations/p6_supervisor.py.
- Docs, report and paper edits of 29/10.

Main S1 runs are still training at this commit; results follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 01:06:59 +00:00
parent 0cfe202a8b
commit f3c30517fa
51 changed files with 6529 additions and 58 deletions

View File

@@ -37,9 +37,10 @@ def zscore_patch(seis: np.ndarray, sel: np.ndarray) -> np.ndarray:
def train_predict(X: np.ndarray, Xte: np.ndarray, spec: dict, cfg: dict, seed: int, budgets: list[int],
device: str) -> dict[int, tuple[np.ndarray, np.ndarray]]:
device: str, on_budget=None) -> dict[int, tuple[np.ndarray, np.ndarray]]:
"""X (N, C, L), Xte (M, C, L); labels in spec are already standardised. Returns {budget: (μ, σ)} for
Xte (M, L), on the standardised scale."""
Xte (M, L), on the standardised scale. on_budget (optional): callback on_budget(step, model) invoked right
after the predictions at each budget step (model in eval mode); the default None leaves the loop unchanged."""
# Same RNG stream as torch.manual_seed, but only touches the selected device: manual_seed_all opens a CUDA
# context on every visible GPU (shared machine).
torch.default_generator.manual_seed(seed)
@@ -80,4 +81,6 @@ def train_predict(X: np.ndarray, Xte: np.ndarray, spec: dict, cfg: dict, seed: i
opt.step()
if step in budgets:
out[step] = predict(model, Xte, device)
if on_budget is not None:
on_budget(step, model)
return out