Skip to content

Broaden scope: accept reconciliation from views-reporting #3

Description

@Polichinel

Proposal

Broaden views-postprocessing from "partner delivery" to "all post-forecast operations" and accept reconciliation (hierarchical country↔grid forecast consistency) from views-reporting.

Why

Reconciliation currently lives in views-reporting but it's not reporting — it's called by ensemble managers in pipeline-core as a core pipeline step before any reporting, evaluation, or delivery. It makes raw predictions consistent. That's post-processing.

views-postprocessing already has the spatial infrastructure (PriogridCountryMapper, bundled shapefiles) that reconciliation needs. Moving reconciliation here:

  • Gives it the right roof (post-processing, not reporting)
  • Removes views-reporting's torch dependency (reconciliation is the only consumer)
  • Lets reconciliation use PriogridCountryMapper instead of viewser for country↔grid mapping
  • Makes the dependency direction clean: pipeline-core → views-postprocessing (not pipeline-core → views-reporting for a non-reporting operation)

What would arrive

Component LOC What it does
ReconciliationModule ~293 Orchestrates parallel country↔grid reconciliation with WandB alerting
ForecastReconciler ~180 Proportional scaling math (torch-backed, preserves zeros, clamps non-negative)
dataset_export ~122 Tensor extraction and dataset writeback utilities
Tests ~200 Type validation, temporal alignment, parallel execution, sum constraints
2 CICs Class Intent Contracts for both classes

ADR-001 impact

The ontology would need a new category:

Category Purpose Stability
Forecast Consistency Operations Hierarchical reconciliation ensuring country totals match grid sums Stable — core algorithm, changes require justification

This broadens the repo from "partner delivery" to "post-forecast operations" — delivery is one kind of post-processing, reconciliation is another.

Metadata question

ReconciliationModule currently uses views_reporting.metadata.build_country_to_grids_cache() (viewser-based) for the country↔grid mapping. views-postprocessing already has PriogridCountryMapper which does the same thing via bundled shapefiles. During migration, reconciliation should switch to PriogridCountryMapper — this removes a viewser dependency and uses the authoritative spatial mapping engine that's already here.

Cross-reference

  • views-reporting#72: "Reconciliation is not reporting — migrate to views-postprocessing"
  • views-reporting#70: viewser dependency tracking (metadata complication)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions