Skip to content

Conversation

@egordm
Copy link
Collaborator

@egordm egordm commented Jan 27, 2026

This pull request introduces support for reference-date-based windowed evaluation in the OpenSTEF Beam evaluation pipeline. The main goal is to allow users to compute evaluation metrics focused on a specific time window around a given reference date, rather than always evaluating over all possible windows. This is achieved by propagating a new reference_date parameter through the pipeline and updating window iteration logic accordingly. Unit tests are also added to ensure correct behavior.

Enhancements to windowed evaluation:

  • Added a reference_date parameter to the evaluation pipeline (evaluation_pipeline.py), enabling evaluation focused on a specific time period around the provided date. This parameter is propagated through run, run_for_subset, and _evaluate_subset methods, and is documented in their docstrings. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated the window iteration utilities (window_iterators.py) to accept and handle the reference_date parameter. When provided, only a single window corresponding to the reference date is yielded, rather than all possible windows. [1] [2] [3] [4] [5]

Window model improvements:

  • Added get_timerange and is_future methods to the Window class, which calculate the time range for a window based on a reference date and check if a window ends after the reference date, respectively.

Testing:

  • Introduced new unit tests in test_window_iterators.py to verify that window iteration returns either all windows or a single window depending on whether reference_date is set.

Minor updates:

  • Updated imports to include datetime where needed for the new functionality. [1] [2]

@github-actions github-actions bot added the feature New feature or request label Jan 27, 2026
Copy link
Collaborator

@MvLieshout MvLieshout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@egordm egordm merged commit 254bc0c into release/v4.0.0 Jan 27, 2026
1 of 2 checks passed
@egordm egordm deleted the feature/beam-window-eval-reference branch January 27, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants