Repository navigation
fix: handle insufficient hourly forecast errors - #1135
Merged
Merged
Conversation
Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com> Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
|
8 of 16 tasks
egordm
added this pull request to stack #1137
October 12, 2026 08:04
lschilders
approved these changes
Oct 12, 2026
egordm
added a commit
that referenced
this pull request
Oct 12, 2026
## What does this PR do? Resolves scikit-learn warning failures that prevented the full local quality gate from passing: - Migrates the bundled splitter artifact by loading and reserializing it with the locked scikit-learn 1.9.1. The old and migrated artifacts produced bit-identical predictions on 260 deterministic inputs; the migrated artifact reloads without version warnings. The loading doctest and unit tests now exercise that clean load directly. - Remove fractional bootstrap sampling from the tiny imputer test and example datasets, avoiding scikit-learn small-sample warnings. - Keep the logistic-regression default as sklearn default rather than explicitly passing deprecated `penalty="l2"`; non-default penalties remain configurable without duplicating constructor setup. This PR is stacked on #1135 and should be merged after it. No linked issue. Validation: `uv run poe all --check` passes locally. The focused splitter/doctest/logistic checks also pass (7 tests). ## Type of change - [x] Bug fix - [ ] New feature - [ ] Breaking change (see checklist below) - [ ] Documentation - [ ] Refactor / chore / CI ## Breaking changes checklist - [ ] Public API, config schema, or serialized/pickled objects changed in a way that affects existing users - [ ] If yes: see the [breaking changes guide](https://openstef.github.io/openstef/contribute/development_workflow.html#breaking-changes) for the pickle/`_migrate_state` migration pattern Migration path for existing users: N/A. ## AI disclosure - [ ] No AI assistance was used (beyond grammar/spelling) - [x] AI assistance was used — tool(s): GitHub Copilot - [x] I have reviewed, understand, and can explain all AI-generated code in this PR - [ ] This is disclosed in a commit message (e.g. `Assisted-by: <tool name>`) ## Checklist - [x] `poe all --check` passes locally - [x] Tests added/updated for the change - [x] Documentation updated (docstrings, user guide, examples) if needed - [x] Commits are signed off per our [DCO](https://openstef.github.io/openstef/contribute/contributing_guide.html#signing-the-developer-certificate-of-origin-dco) (`git commit -s`) - [x] PR title follows [Conventional Commits](https://www.conventionalcommits.org/) (e.g. `feat: ...`, `fix: ...`, `feat!: ...` for breaking changes) --------- Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
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.



What does this PR do?
Prevents sparse hourly residual groups from propagating NaN standard deviations into forecasts. Under-sampled hours use pooled residual variability from the same horizon. If pooled uncertainty cannot be estimated for any horizon, the applicator warns once and passes forecasts through unchanged.
Closes: No linked issue.
Validation: The focused applicator suite passes (9 tests), as do Ruff, formatting, and
ty.poe all --checkreports failures in the unrelatedLinearComponentSplitterandImputertests.Type of change
Breaking changes checklist
_migrate_statemigration patternMigration path for existing users: N/A.
AI disclosure
Assisted-by: <tool name>)Checklist
poe all --checkpasses locallygit commit -s)feat: ...,fix: ...,feat!: ...for breaking changes)