Add P6 benchmark code, locked protocol_bench, T2 study
- 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.
- T2 mechanism declaration and results; operations/p6_supervisor.py.
- Docs, report and paper edits of 29/10.
outputs/ stays out of git; the repository folder is synced as a whole to
the new server. Main S1 runs are still training at this commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user