You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run_simulation takes 15 positional parameters and 9 config dataclasses from one file, with no runtime schema — every caller is welded to the core's shape #5
Fifteen positional parameters; nine of them config dataclasses (BatteryParams, TimeParams, EMSParams, MPCParams, EKFParams, ThermalParams, ElectricalParams, RegulationParams, PackParams), all defined in one 373-line file core/config/parameters.py. Seven call sites (comparison/*.py ×3, tests/*.py ×2, plus internal) each build all nine and pass them in order.
No runtime schema. There is no way to ask "what are the settable fields of this experiment?" without reading source. RCWS answers that off the dataclasses in ~40 lines (simulation/config.py: dotted --set path=value, typed coercion, typo'd keys refused, config_fields() for any view). Nothing here can offer a --set, a form, or a record of what was set.
Strategy(str, Enum) at parameters.py:283 collides by name with the real Strategy dataclass in core/simulator/strategy.py — a leftover that a reader has to disambiguate.
What it should be
One experiment config object composed of the parameter dataclasses (nesting is fine — that is what dotted paths are for), passed as one argument.
The introspection RCWS already has: fields, types, defaults, and later knob metadata (label, unit, doc, bounds, choices) — the declaration a form and a --set both read.
Component configs travel with their component (an estimator carries its EKFParams), so run_simulation never names one.
Done when
run_simulation(strategy, experiment_config) — or equivalent — and every caller migrated.
config_fields() returns every settable path; a --set path=value override engine exists and refuses unknown keys.
The stray Strategy enum is gone or renamed.
Proof: bit-identical traces at every caller.
Phase 1 of the platform epic; the piece the records (phase 2) are recorded from. Depends on #1.
What is wrong
core/simulator/core.py:54-69:Fifteen positional parameters; nine of them config dataclasses (
BatteryParams, TimeParams, EMSParams, MPCParams, EKFParams, ThermalParams, ElectricalParams, RegulationParams, PackParams), all defined in one 373-line filecore/config/parameters.py. Seven call sites (comparison/*.py×3,tests/*.py×2, plus internal) each build all nine and pass them in order.Consequences:
simulation/config.py: dotted--set path=value, typed coercion, typo'd keys refused,config_fields()for any view). Nothing here can offer a--set, a form, or a record of what was set.Strategy(str, Enum)atparameters.py:283collides by name with the realStrategydataclass incore/simulator/strategy.py— a leftover that a reader has to disambiguate.What it should be
knobmetadata (label, unit, doc, bounds, choices) — the declaration a form and a--setboth read.EKFParams), sorun_simulationnever names one.Done when
run_simulation(strategy, experiment_config)— or equivalent — and every caller migrated.config_fields()returns every settable path; a--set path=valueoverride engine exists and refuses unknown keys.Strategyenum is gone or renamed.Phase 1 of the platform epic; the piece the records (phase 2) are recorded from. Depends on #1.