Raised by #9 (Phase 6), where it broke the same test fixture three times.
build_experiment_configs produces a dict per experiment from vars(args), and it is consumed three ways:
run_experiment unpacks it one experiment_config[key] per line, so a new flag means a new line there and a KeyError in every test fixture that builds a config by hand. Three flags were added on the Phase 6 branch and test_sweep.build_config had to be edited three times.
results.identity and _write_failed_experiment read the same keys again by string with .get(key, "") defaults, so a typo produces an empty column rather than an error.
- the file names thread through as one string per file per call, down two levels.
A frozen dataclass built from vars(args) collapses all three: one place that names the fields, KeyError at construction rather than deep inside a worker, and no .get defaults papering over a typo. results.experiment_key — the --resume key — becomes a method on it rather than a string-keyed lookup that has to agree with a CSV header.
Not done in #9 by direction: refactors that do not stop a sweep finishing were kept out of that phase.
Raised by #9 (Phase 6), where it broke the same test fixture three times.
build_experiment_configsproduces a dict per experiment fromvars(args), and it is consumed three ways:run_experimentunpacks it oneexperiment_config[key]per line, so a new flag means a new line there and aKeyErrorin every test fixture that builds a config by hand. Three flags were added on the Phase 6 branch andtest_sweep.build_confighad to be edited three times.results.identityand_write_failed_experimentread the same keys again by string with.get(key, "")defaults, so a typo produces an empty column rather than an error.A frozen dataclass built from
vars(args)collapses all three: one place that names the fields,KeyErrorat construction rather than deep inside a worker, and no.getdefaults papering over a typo.results.experiment_key— the--resumekey — becomes a method on it rather than a string-keyed lookup that has to agree with a CSV header.Not done in #9 by direction: refactors that do not stop a sweep finishing were kept out of that phase.