Fix drop_unchanged prior-belief selection regression#2086
Open
Ragnar-the-mighty wants to merge 1 commit intoFlexMeasures:mainfrom
Open
Fix drop_unchanged prior-belief selection regression#2086Ragnar-the-mighty wants to merge 1 commit intoFlexMeasures:mainfrom
Ragnar-the-mighty wants to merge 1 commit intoFlexMeasures:mainfrom
Conversation
When prior beliefs are ordered descending by belief_time, _drop_unchanged_beliefs_compared_to_db could compare against an older prior belief and incorrectly drop a changed candidate belief. Select the latest prior belief strictly earlier than the candidate and add regression tests covering helper-level and save_to_db behavior.
Documentation build overview
Show files changed (1 files in total): 📝 1 modified | ➕ 0 added | ➖ 0 deleted
|
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.
Description
_drop_unchanged_beliefs_compared_to_dbso it always compares against the latest prior belief time, independent of belief-time ordering.save_to_db(..., save_changed_beliefs_only=True)integration behavior.documentation/changelog.rstLook & Feel
N/A
How to test
pytest flexmeasures/data/tests/test_time_series_services.py -k drop_unchangedtest_drop_unchanged_compares_against_latest_prior_belieftest_drop_unchanged_helper_uses_wrong_prior_when_belief_times_descendingFurther Improvements
Related Items
Sign-off
Made with Cursor