Repository navigation
Closed
Labels
needs-decisionRequires a human decision before proceedingplanningInvestigation/spike/decision workreconciliationForecast reconciliation migration (views-reporting -> here)storyA single reviewable unit of an epic
Description
Epic: #31 · Type: spike / decision — first story, gates the rest.
Background
The frozen views-reporting reconciliation groups grid cells by VIEWS country_id, which build_country_to_grids_cache fetches from viewser over the network (views_reporting/metadata/entity_metadata.py). Our GAUL lookup (views_postprocessing/data/gaul_lookup.parquet) carries admin1_gaul0_code — a different country-id system. To prove parity we must group by the same VIEWS country_id, and we want the parity test to run offline (no viewser, no torch in CI).
Work
- Build a small but realistic cm + pgm sample (several countries, multiple grid cells each, multiple months, ≥1 target, a real-ish sample count) — richer than
views-reporting/tests/test_reconciliation_module.pyfixtures. - Run the untouched views-reporting reconciliation on it with an explicitly injected country→grids mapping (bypass viewser), and freeze
(cm, pgm, mapping, reconciled_pgm)to a committed fixture (tests/fixtures/reconciliation_e2e_parity.npz) via a generator script (mirrorscripts/gen_reconciliation_parity_fixture.py). - Decide & record (short ADR or risk-register note): the frames-native module groups by an injected VIEWS
country_idmapping for parity; sourcing the mapping from the GAUL lookup (different id system) is a separate later decision.
Acceptance criteria
- Committed fixture with cm, pgm, the injected mapping, and the oracle's reconciled pgm output.
- Generator needs torch + views-reporting only at generation time; the fixture is consumed offline.
- The id-system decision is written down (ADR/register) and linked from the epic Epic: Migrate forecast reconciliation into views-postprocessing (frames-native, parity-proven) #31.
Validation
- Fixture loads with numpy alone; a smoke check confirms the slice-1
reconcile_proportionalreproduces per-country slices of the oracle output.
Dependencies
First story — none.
Metadata
Metadata
Assignees
Labels
needs-decisionRequires a human decision before proceedingplanningInvestigation/spike/decision workreconciliationForecast reconciliation migration (views-reporting -> here)storyA single reviewable unit of an epic
Activity
feat(reconciliation): capture offline end-to-end parity oracle (S0, #32)