Repository navigation
Correct the default-dataset switch docs page (#1692) - #1718
Conversation
4a46c65 to
4445482
Compare
#1692 asks for a documented model-side path to switch the default dataset from the enhanced FRS to Microplex UK (mp-30k-uk), with an explicit rollback path. Persist that plan in-repo at docs/book/assumptions/mp30k-uk-switch-plan.md. The page covers: - the current state: the dataset URL is resolved at runtime (constructor arg -> POLICYENGINE_UK_DEFAULT_DATASET env var -> ValueError), so the model is already dataset-agnostic and the switch is a configuration concern rather than a code change, - loader-side assumptions to audit before switching (HDF5 layout matching UKMultiYearDataset, advertised years, enum label parity), - variable-side audit needs (input/* columns present in both datasets; reported-vs-derived benefit columns implying take-up recalibration), - calibration-side implications for policyengine-uk-data targets, - five gating criteria (aggregate parity, cross-section parity, reform parity, full test suite, documentation parity), - a rollback path that requires no code change in this repo — just reverting the env var per deploy environment and keeping eFRS published in parallel during beta.
…elog fragment Checked every variable, parameter, path and link against main in October 2026, updated the data pipeline references to Microcosm UK, and renamed the changelog fragment to a Towncrier type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the unverified Microcosm UK release date and the Microplex archive month (the repository is archived; the date is not recorded), keep the national file name, which Microcosm's runbook and registry use. Note that Microsimulation() here is deprecated in favour of policyengine.py's managed bundle (README), so the default switch has to happen there too. Say that _pre_encode_enum_columns lives in simulation.py, not dataset_schema.py. Drop the leading bullet from the changelog fragment so towncrier does not render it twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4445482 to
118b1c9
Compare
Main already carries this page (added by #2386); the merge brings the branch up to date before the page is corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An inline situation is used before dataset= and the environment variable (simulation.py:349-362). - Tests now pin enhanced_frs_2024_25.h5 from policyengine-uk-data 1.58.1 by commit and SHA-256 (tests/certified_dataset.yaml), not the 2023-24 1.40.3 file, so both datasets share the 2024-25 base year. - policyengine.py 6.10.0 (21 October 2026) switched its UK default to Microcosm UK 2024-25; only this repository's tests remain on the eFRS. - Enum columns are matched by member name and an unknown name raises a ValueError (core Enum.encode), rather than encoding incorrectly. - The loader sets any dataset column named after a variable, so variables/input/ is not the whole data contract. - Rollback is not code-free: gov.simulation.vat.survey_consumption_coverage is calibrated to Microcosm UK only and must be re-derived. - Replaced the released .added fragment with a .changed fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The tests set the variable only when it is not already set (conftest.py). - policyengine.py switched under its own certification, with a recorded UC caseload-floor exception; the page no longer implies the gates ran, and no longer claims nothing else downstream uses the eFRS. - test_latest_data_smoke.py still loads enhanced_frs_2023_24.h5, and the three named tests do not exercise a new default; criterion 4 now names the certified pin and the reform regression fixtures. - variables/input/ holds many, not most, of the dataset inputs. - The VAT coverage parameter matches one Microcosm cut (20261002), not the cut policyengine.py now pins; 38% and 44% are two uk-data releases. - Rollback: the tests' default is a committed pin, and policyengine.py's default comes from its manifest, not the environment variable. - An hf:// path cannot load Microcosm UK, which sits in a dataset repo while core requests repo_type="model". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Second-round review: materialise() in utils/aggregate_impact/dataset.py downloads the pinned file with repo_type="model" and load_pin() accepts no repository-type key, so criterion 4 cannot pin a Microcosm file without a loader change. Also corrected the description of the three named tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
UK hub (Claude build session, for Max) Head: Context. This page already reached main, byte for byte, through #2386 (merged 21 October 2026; batch commit d50ee85), and its Is the plan still worth having? Partly overtaken: policyengine.py 6.10.0 (21 October 2026) already switched its UK default to Microcosm UK. The page now says so, and says it doesn't record whether these gates were run for that switch. The plan still applies to switching this repository's test pin, which stays on the Enhanced FRS. I recommend keeping it. Review. I had a verifier extract and check every claim, checked each correction myself, and then ran independent adversarial reviews. Rounds 1 and 2 asked for changes, and round 3 approved; its one optional precision point is folded into this head. Corrected (13)
Checked and correct (unchanged)
Uncertain
|
Corrects the default-dataset switch and rollback planning page (
docs/book/assumptions/mp30k-uk-switch-plan.md), written for #1692.The page itself is already on main: it shipped in #2386 (merged 21 October 2026), and its original
.addedchangelog entry was released in 2.143.0. This branch has merged main, dropped the released fragment and now carries only corrections to main's copy of the page.What this PR corrects (from its changelog fragment):
The claim-by-claim review behind these corrections, with sources, is in the "Ready for hub review" comment on this PR.
changelog.d/1692-dataset-switch-page-corrections.changed.md(changed).🤖 Generated with Claude Code