da7cde3ef9670d9fd9f25a3ec6463c0e8b0e1d45
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
da7cde3ef9 |
v0.3.0 post-implementation audit: resolve all 9 tracked discrepancies
CI / Lint (ruff check) (push) Successful in 27s
CI / Format (ruff format) (push) Successful in 28s
CI / Sync project version with tag (push) Has been skipped
CI / Lint (ruff check) (pull_request) Successful in 36s
CI / Type check (ty) (push) Successful in 39s
CI / Format (ruff format) (pull_request) Successful in 30s
CI / Sync project version with tag (pull_request) Has been skipped
CI / Type check (ty) (pull_request) Successful in 30s
CI / Tests (pull_request) Successful in 2m50s
CI / Tests (push) Successful in 2m58s
Works through docs/v0.3.0-followups.md item by item, closing the gap between the design doc and the shipped v0.3.0-stage2-autoregressive code: 1. validate.py: 7-tuple batch unpacking, sample_stage1/sample_stage2 dispatch, stage-2 particle-type-class marginal. 2. Stage-prefixed --stage1-*/--stage2-* CLI flags for train/new-run. 3. Thread stage2_model.k_max through loader/transforms/dataset/pipeline/ train instead of the hardcoded K_MAX constant. 4. Mixed conditioning.particle.type / conditioning.material.type support end-to-end (data pipeline + dwarf warm-cache). 5. conditioning.share_stages = true: one shared ConditionEncoder instance across both stages. 6. stage2_model.generator = "ddpm" formally deferred into design doc §11.2 (was silently unimplemented). 7. giant predict/rollout: implement conditioning.*.type = "onehot" via the checkpoint's saved pdg_topn_map/mat_topn_map. 8. network.py's checkpoint-path model_config migration now fails loudly on non-zero legacy expert_hidden_dim/expert_n_blocks, matching config.py's TOML-load path (§4.2). 9. validate_config now rejects stage2_model.n_sec.mode = "truth" for a rollout-capable checkpoint (§9). Also cleared all pre-existing `ty check` noise (44 -> 0 diagnostics), mostly a test-helper dict-unpack pattern that made every unrelated constructor keyword look like a type error. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|
|
a489991a3b |
Document the differentiability position and its validation obligation
The categorical type path is not differentiable, and v0.3.0 accepts that: the expected contribution of the broken path to the total gradient is assumed negligible. Record it as an assumption with an explicit obligation to demonstrate it, not as a settled result. Separates the three things "broken" covers, since they have different status: per-token loss under teacher forcing is fine (softmax CE needs no sampling); ST-Gumbel into the critic is biased rather than absent (hard forward, soft backward); full shower-rollout backprop was already structurally non-differentiable once secondaries branch, so the switch costs nothing that was not already lost. The accepted claim concerns only the middle one. Lists three ways to falsify it, cheapest first: gradient-magnitude accounting through the type slice vs the continuous slices, a detached-type ablation, and an estimator swap against REINFORCE if those are inconclusive. The first is wired into implementation step 5 so evidence accrues during the architecture comparison rather than in a dedicated run afterwards, and the fallback if the ratio is not small is a config change (target = "physical" or a non-adversarial CE head), not a redesign. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
376bdb9d08 |
Refine v0.3.0 design: defaults, deferred scope, open questions
Config defaults: dropout 0.1 -> 0.0, wandb false -> true. The v0.3.0 work is a sequence of architecture comparisons, and an unlogged run is not comparable, so W&B is on unless explicitly disabled. Restructure the open-questions section into settled / deferred / tracked / still-open, since most of it is now decided: - other_policy three-way switch and separate flow/ddpm sub-tables are approved as specified. - stop_token is schema-valid but raises "not implemented in v0.3.0"; charge conservation gets no key at all and is left deliberately undesigned, to be worked out on its own terms rather than pre-shaped by this refactor. The speculative charge-mask sketch is removed. - Logging the L1 decode-distance distribution under target = "embedding" becomes tracked implementation work, landing with the rollout decode. - estimate_batch_size recalibration becomes implementation step 8, last: the activation-memory profile is not knowable until the AR trunk and history encoder are final, so it is measured on real hardware with the example configs rather than guessed. Only the differentiability question for Jan remains genuinely open. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
f390884f67 |
Add v0.3.0 design doc: Stage-2 autoregressive redesign
Design contract for the v0.3.0 config break and network.py refactor, following the 2026-08-04 meeting with Jan. Not implemented yet. The 2026-08-03 WGAN rollout benchmark failed specifically at the secondary-species level (zero photons, ~4M hallucinated -14 muon antineutrinos). The response pivots Stage 2 to autoregressive generation in descending-energy order with teacher forcing, and reverts the particle type to a categorical representation. That needs a config break: [conditioning] / [stage1_model] / [stage2_model] / [train] replace the single global train.mode and [model] block, so per-stage generators (stage1 flow + stage2 wgan), stage-2-only training, and one-shot-vs-autoregressive comparison all become expressible. The particle and material conditioning axes are configured independently and mix freely, each with physical / embedding / onehot modes; the stage-2 type target mirrors the same three names, with conditioning.particle.emb_dim sizing both so the two share one class map. network.py collapses from ten permutation classes (stage x objective x routed) into composable parts — encoder x trunk x objective — which also makes routed WGAN work for the first time; it was only ever rejected because no routed WGAN generator class existed. The doc specifies every config option, the v0.2 migration (shim for both configs and checkpoints, gated on a bit-identical output diff), the refactor, and the implementation order. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |