Skip to content

Conversation

@dfulu
Copy link
Member

@dfulu dfulu commented Jan 6, 2026

Pull Request

Description

Fixes a bug was introduced in #385 where the datetimes passed into the original sin/cos datetime encoder were unintentionally changed.

Also adds to tests so that the error in that original PR would have been caught

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@felix-e-h-p felix-e-h-p self-requested a review January 6, 2026 12:44
# Add datetime features
generation_config = self.config.input_data.generation
datetimes = pd.date_range(
t0 + minutes(generation_config.time_resolution_minutes),
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to check - this was determining length of what's generated right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeh that's right. The mistake was that I started it from the first step of the forecast but the old behaviour which we need to match is that it starts from the first step of the generation history

@dfulu dfulu merged commit d7b8b16 into main Jan 6, 2026
6 checks passed
@dfulu dfulu deleted the datatime_hotfix branch January 6, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants