Reproducibility pass: figure map, one-command reproduce.sh, notebooks, Makefile gaps
An audit of the figure pipeline found real sync gaps, now closed:
- `paper/pnas/make_figs.py` (which draws every manuscript figure) was invoked
by NO Makefile target or script - a manual step. Added `make paper-figures`.
- `configs/llm/epistasis{,_compat}.yaml` were reachable from nothing at all,
despite producing Fig. 3C-D. Added `make llm-epistasis` (+ its statistics).
- `make figures` never regenerated the MNIST montage that Fig. 2B embeds;
it now runs with the `mnist` target (it needs torch - it re-simulates).
- Added `make llm-society`, `env-notebooks`, `notebooks`.
New REPRODUCING.md is the authoritative map: every manuscript panel -> the
artifact it plots -> the config that produced it -> that config's seed, plus
the determinism policy (biological tier bitwise; GPU tiers statistical), the
seed-provenance statement, and an artifact-hash verification snippet. All 44
committed bundles currently hash-match their manifests, and figure
regeneration is pixel-identical (verified by comparison).
reproduce.sh delivers the one-command reproduction the paper's Methods
promises, writing REPRODUCED.md with recomputed hashes per bundle.
Two executed notebooks: 01 builds the Wright-Fisher model from scratch and
checks both closed forms interactively (runs in ~1 min on a laptop); 02
verifies artifact hashes then regenerates and displays all seven manuscript
figures. Both execute end-to-end (`make notebooks`).
Also pins `.python-version` to 3.14: the interpreter was previously
unpinned, and a `uv sync` silently switched it to 3.11 mid-session (see
tasks/lessons.md). README rewritten - it still described a Layer-1-only repo
of E1-E6 and pointed at a figure_manifest.md that does not exist.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkRLcc18rwT2Lysu6PbG7v
This commit is contained in:
parent
8086504f44
commit
c435cfba6e
18 changed files with 4204 additions and 28 deletions
25
Makefile
25
Makefile
|
|
@ -1,7 +1,8 @@
|
|||
# Layer 1 + Layer 1.5 automation. The uv venv (built from the committed uv.lock) is the
|
||||
# reproducibility source of truth; every target runs inside it via `uv run`.
|
||||
|
||||
.PHONY: env env-neural env-mnist env-llm test layer1 layer2 neural mnist llm figures clean
|
||||
.PHONY: env env-neural env-mnist env-llm env-notebooks test layer1 layer2 neural mnist llm \
|
||||
llm-epistasis llm-society figures paper-figures notebooks clean
|
||||
|
||||
env: ## build .venv from the committed lockfile
|
||||
uv sync --extra dev
|
||||
|
|
@ -27,6 +28,7 @@ mnist: ## run the torchvision tiers: MNIST collapse + E13 real-weigh
|
|||
uv run python -m neural.experiment configs/neural/speciation_real.yaml
|
||||
uv run python -m neural.experiment configs/neural/speciation_real_cliff.yaml
|
||||
uv run python -m neural.experiment configs/neural/speciation_real_emergent.yaml
|
||||
MPLBACKEND=Agg uv run python figures/mnist_montage.py # the asset paper Fig. 2B embeds
|
||||
|
||||
env-llm: ## add the LLM stack for the Layer-2 prototype (GPU; transformers/peft)
|
||||
uv sync --extra dev --extra neural --extra llm
|
||||
|
|
@ -40,6 +42,14 @@ llm-speciation: ## LLM-tier speciation: conflict cliff (replace + de-confound
|
|||
uv run python -m llm.experiment configs/llm/speciation.yaml
|
||||
uv run python -m llm.experiment configs/llm/speciation_add.yaml
|
||||
|
||||
llm-epistasis: ## the controlled predictive test (feeds paper Fig. 3C-D) + its robust statistics
|
||||
uv run python -m llm.experiment configs/llm/epistasis.yaml
|
||||
uv run python -m llm.experiment configs/llm/epistasis_compat.yaml
|
||||
uv run python figures/stats_llm_epistasis.py
|
||||
|
||||
llm-society: ## the composed society at LLM scale (C3): pilot; the campaign runs on HPC
|
||||
uv run python -m llm.experiment configs/llm/society.yaml
|
||||
|
||||
llm-seeds: ## multi-seed firm-up (heavy): merge x5, moe-hard x3, directed-hard x3
|
||||
uv run python -m llm.experiment configs/llm/merge_seeds.yaml
|
||||
uv run python -m llm.experiment configs/llm/moe_hard_seeds.yaml
|
||||
|
|
@ -47,11 +57,22 @@ llm-seeds: ## multi-seed firm-up (heavy): merge x5, moe-hard x3, directe
|
|||
|
||||
layer2: neural ## alias: Layer 1.5 is the current Layer-2 deliverable (LLM rung deferred)
|
||||
|
||||
figures: ## regenerate figures from committed results
|
||||
figures: ## regenerate per-experiment figures from committed results (pure; no re-simulation)
|
||||
for e in E1 E2 E3 E4 E5 E6; do MPLBACKEND=Agg uv run python figures/plot_$$e.py; done
|
||||
for p in figures/plot_*.py; do case "$$p" in */plot_E[1-6].py|*/_*) ;; \
|
||||
*) [ -e "$$p" ] && MPLBACKEND=Agg uv run python "$$p" ;; esac; done
|
||||
|
||||
paper-figures: ## regenerate the manuscript figures (Fig. 1-7) and rebuild the PDF body
|
||||
MPLBACKEND=Agg uv run python paper/pnas/make_figs.py
|
||||
uv run python paper/pnas/build.py
|
||||
|
||||
env-notebooks: ## add Jupyter for the walkthrough notebooks
|
||||
uv sync --extra dev --extra notebooks
|
||||
|
||||
notebooks: ## execute every notebook end-to-end (a reproduction check in itself)
|
||||
for nb in notebooks/*.ipynb; do uv run jupyter nbconvert --to notebook --execute \
|
||||
--inplace --ExecutePreprocessor.timeout=1800 "$$nb"; done
|
||||
|
||||
clean: ## remove caches and generated results (keeps committed manifests)
|
||||
rm -rf .pytest_cache **/__pycache__
|
||||
find results -type f ! -name '.gitkeep' -delete 2>/dev/null || true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue