Skip to content

five rows in the 2025-11-19 block of flu_geo_exclusions.csv are dated 2024-11-19 (year typo) — linear, linearlog, climate_base, climate_geo_agged, climate_quantile_extrapolated receive no weights for that date #214

Open

Description

@docxology

Severity (my assessment): high
Area: prod flu pipeline / ensemble weights (committed data)
Commit observed: current main (ccc2ee4); the file is untouched by ccc2ee4, so rows are identical at 5e35f53 and main
Accompanying patch: patches/exploration-tooling/fix-flu-weights-2025-11-19-year-typo.patch (candidate PR)

Summary

In the committed scripts/flu_geo_exclusions.csv, the block commented # Nov 19, data returns, switch back to seasonal forecasters (line 75) contains four rows dated 2025-11-19 followed by five rows dated 2024-11-19 (lines 81-85):

2025-11-19, all, mp, 0
2025-11-19, windowed_seasonal, all, 0.5
2025-11-19, windowed_seasonal_extra_sources, all, 3
2025-11-19, climate_linear, all, 0.001
2024-11-19, linear, all, 3
2024-11-19, linearlog, all, 0
2024-11-19, climate_base, all, 2
2024-11-19, climate_geo_agged, all, 0
2024-11-19, climate_quantile_extrapolated, all, 0

Everything about the context points to a copy-paste where the year wasn't updated:

  • The neighboring complete blocks (Nov 26 at lines 65-73, Oct 15 at lines 89+) each contain exactly these five forecasters.
  • The twin scripts/flu_nssp_geo_exclusions.csv has a complete 2025-11-19 block with the same shape.
  • 2024-11-19 appears exactly 5 times in the file — all in this block — so there is no genuine 2024 block that these rows could belong to.

Mechanism

parse_prod_weights (R/utils.R:283, unchanged at main) filters to forecast_date == 2025-11-19, so the five typo'd rows are filtered out and those forecasters get no weight rows. In ensemble_climate_linear (R/forecasters/ensemble_linear_climate.R:59-98) their weight becomes NA, the renormalization mass = sum(weight) (computed without na.rm) becomes NA for every affected (geo, ahead, quantile) group, and the final sum(value, na.rm = TRUE) (line 98) zeroes the whole group — so the entire climate_linear ensemble output for 2025-11-19 is zeros. Nothing in the pipeline errors on the missing rows (a related, more general validation gap is covered in a separate issue I've drafted).

Maintainer-runnable repro

sed -n '75,85p' scripts/flu_geo_exclusions.csv
grep -c "2024-11-19" scripts/flu_geo_exclusions.csv   # → 5

In R:

w <- readr::read_csv("scripts/flu_geo_exclusions.csv", comment = "#", show_col_types = FALSE)
nrow(dplyr::filter(w, forecast_date == as.Date("2025-11-19")))   # → 4 (five forecasters missing)

Impact

For any run whose forecast date is 2025-11-19 — e.g., an evaluation-mode replay covering the 2025 season, which the evaluation window (scripts/flu_hosp_prod.R:74-86) includes — the climate_linear ensemble output is all zeros with no error anywhere, which also perturbs that week's score/report targets. I want to be careful about scope: I'm reporting what the committed file implies when the pipeline runs for that date; I don't have visibility into what was actually submitted at the time, and I'll leave that assessment to you.

Suggested fix

I've prepared a candidate patch (see accompanying diff) that changes the five rows' date from 2024-11-19 to 2025-11-19 and touches nothing else (weights unchanged). I verified it with both git apply --check and patch -p1 --dry-run against the current tree (the file is byte-identical between 5e35f53 and ccc2ee4, so it applies to both). Beyond fixing the rows themselves, I'd also suggest the fail-closed weight-coverage validation from the related issue so a missing/duplicate-date row can never silently zero an ensemble again.

Activity

  1. dshemetov commented on Oct 1, 2026

    @dshemetov
    Contributor

    Closed by #233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions