dict/dataclass boundary is inverted in build_models (raw dicts re-parsed downstream) #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
build_modelstakesmodel_config: dict, parses it into the frozendataclasses, then passes raw dicts (
particle_cfg,material_cfg,particle_type_cfg) back down into every module constructor — which re-readthem with string-literal defaults:
.get("target", "physical")appears inmodels.py(×4),sample.py(×2),stage2_inputs.py(×3),trainers.py.That's the exact drift the branch already had to fix once (making config
dataclasses the single source of truth): the dataclass default and the inline
.getfallback are two independent copies of the same fact.Proposal: pass
ConditioningAxisConfig/ParticleTypeConfigthemselves.tythen catches a misspelled field instead of it silently falling back.Migrated from
issues.md(v0.3.0 branch review, 2026-08-13), Issue 13.