Fix multi-round forecast matching for multi-horizon dataset questions - #171
Merged
Conversation
When a dataset question appears in multiple rounds, each round has different resolution_dates (derived from forecast_due_date + horizons). The dedup logic only kept resolution_dates from the first round seen, so later rounds' composite keys had no matching forecast and scored as 0.5 (missing). Fix by merging resolution_dates across all rounds for each unique question ID during dedup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
lukeinglis
marked this pull request as ready for review
August 22, 2026 22:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the multi-round forecast matching bug (root cause of poor dataset Brier scores)
Changes
resolution_datesacross all rounds for each unique question ID. Previously, only the first round's resolution_dates were kept, so the multi-horizon forecaster only produced composite keys for one round. Later rounds' composite keys (e.g.,dq1_2024-07-30) had no matching forecast and scored as 0.5 (missing).TestMultiRoundForecastMatchingwith two regression tests:test_multi_round_merges_resolution_dates: Verifies the multi_forecaster receives all merged horizonstest_multi_round_no_missing_forecasts: Verifiesn_missing=0when a question spans multiple roundsRoot Cause
When a multi-horizon dataset question appears in N rounds,
join_resolved_questionscreates entries for each round with round-specific resolution_dates (forecast_due_date + FORECAST_HORIZONS_IN_DAYS). The eval dedup kept only the first round's dates, so the forecaster produced composite keys (e.g.,dq1_2024-06-29) for only one round. The composite-key rewriting step couldn't match later rounds' entries, leaving them unmatched → scored as 0.5.