Skip to content

feat(v0.5.3): Pre-GPU engineering & scientific methodology hardening - #5

Merged
jameslehoux merged 1 commit into
feature/paper-ready-conditionalfrom
fix/pre-gpu-review-hardening
Dec 2, 2026
Merged

jameslehoux merged 1 commit into
feature/paper-ready-conditionalfrom
fix/pre-gpu-review-hardening

Conversation

@jameslehoux

Copy link
Copy Markdown
Contributor

Summary

Addresses the 2 Dec 2026 review of feature/paper-ready-conditional (72e02c3, v0.5.2) prior to launching Isambard-AI GH200 GPU runs:

  1. Stack Pinning & Reproducibility (v0.5.3):
    • Pins monai==1.6.2 and [email protected] across .github/workflows/ci.yml, requirements-isambard.txt, and environment.yml, and aligns pyproject.toml (monai>=1.4,<1.7, safetensors>=0.4).
  2. Step-Budgeted Cosine Training, Mid-Epoch SIGUSR1 Preemption & Throughput Probe:
    • Adds --max-train-steps with linear warmup + cosine LR decay (compute_lr_multiplier) so Sparse, Few-Shot, and Oracle arms receive identical optimizer updates and predictable GPU cost.
    • Adds #SBATCH --signal=B:USR1@600 (exec / child-PID signal forwarding traps), immediate mid-epoch latest.pth + ema_weights.safetensors saving, step-exact --resume, and a 20-minute GH200 throughput/memory probe (slurm/benchmark_carbon_conditional_96.slurm -> throughput_summary.json).
    • Reorders resolve_checkpoint_path to ("best_sample.pth", "latest.pth", "ema_weights.safetensors", "best_val.pth") and adds --sample-val-every-steps so single-timestep denoising MSE never overrides converged EMA weights.
    • Parameterizes all 8 active scripts in slurm/ (removing hardcoded /projects/u6uc/asif paths) and archives 24 superseded binary scripts/Slurm files into legacy/.
  3. Smooth Non-Aliasing Conditioning & Anisotropy-Safe Symmetries:
    • Lowers default fourier_max_period from 16.0 to 1.5 ([0.25π, 1.5π], avoiding both high-frequency hash memorization across 3–5 loads and cos(±π) = -1 endpoint aliasing; retains 16.0 fallback for legacy checkpoints), adds conditioning_mode="smooth_mlp", and adds optional --use-z-coord-channel.
    • Defaults allow_z_flip=False to preserve plunger-to-base compaction asymmetry and adds --no-xy-rot90 (D_2(XY) 180° + X/Y flips) paired with Gate 0 X/Y chord isotropy warnings.
  4. Marching-Cubes Stereology, 3D Halo Stripping & Connectivity Conventions:
    • Adds boundary-clipped 3D marching-cubes SSA (ssa_*_mc, including exact 3-phase binary inclusion–exclusion for 0–2, 0–1, 1–2 interfaces) as the default Newman ASR kinetic area (kinetic_area_convention = "marching_cubes"), alongside ssa_*_cc (OpenImpala parity) and ssa_mc_over_cc_ratio.
    • Keeps 6-connectivity primary for face-flux PDE consistency while reporting both *_6 and *_26 explicitly.
    • Upgrades strip_partial_volume_carbon_halo to isotropic 3D 3 × 3 × 3 structuring elements across prepare_local_drive_bundle.py and segment_carbon_xct.py (audit_halo_anisotropy_preservation).
  5. Symmetric CFG, Strict Gate 1, All-Interior LOO & Newman Sensitivity:
    • Defaults guidance_scale_inv to match guidance_scale in virtual_compress_volumes for symmetric DDIM ODE inversion.
    • Adds blind zero-leakage affine_z_squash_pchip, side-by-side XY/XZ/YZ orthoslices, tiled >96³ vs val/tall_patches.npy REV audits, strict --assert-gate1 checks, a Gate 1 CFG sweep (w in {1.0, 1.25, 1.5, 2.0}), STAGE=loo_virgin across every interior Virgin Felt load, and Newman ASR contact-resistance sensitivity (heuristic_pinch, constant, zero) with explicit n = 1 specimen framing.
  6. Modular Tests, CPU Single-Patch Overfit & Documentation Alignment:
    • Adds tests/test_overfit_single_patch.py, tests/test_step_budget_and_preemption.py, and tests/test_conditioning_and_stereology.py, splits monolithic test_next_level_novelty.py by behaviour, and aligns README.md, AGENTS.md, and experiments.md.

Verification

  • python -m compileall -q porousdiff porousdiff_workflows scripts tests — Pass
  • python -m basecoat.layers — Pass (0 banned imports)
  • ruff check porousdiff porousdiff_workflows scripts tests — Pass
  • bash -n slurm/*.slurm — Pass
  • OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 TORCH_NUM_THREADS=1 pytest -v — 56 passed, 1 skipped (OpenImpala v5.2.0, basecoat v0.3.0, MONAI 1.6.2, safetensors 0.8.0)

@jameslehoux
jameslehoux merged commit e99ff55 into feature/paper-ready-conditional Dec 2, 2026
1 check passed
@jameslehoux
jameslehoux deleted the fix/pre-gpu-review-hardening branch December 2, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant