fix(assets): select one deterministic belief per event in KPI endpoint (#2471) - #2488
Closed
taran-dev4u wants to merge 1 commit into
Closed
Conversation
FlexMeasures#2471) Signed-off-by: Taran Mamidala <mamidalataran6333@gmail.com>
taran-dev4u
force-pushed
the
fix/kpi-single-deterministic-belief-per-event
branch
from
September 7, 2026 16:07
ed66ca9 to
1d4e193
Compare
Documentation build overview
|
Member
|
Thanks for taking this on, and for spotting the same root cause we did — the missing A fix for #2471 was already in flight in #2472, which has since been merged, so this one is superseded. Closing, but the contribution is appreciated — hope to see you in another issue! |
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 #2471.
In
[GET] /assets/<id>/kpis,sensor.search_beliefswas called withmost_recent_beliefs_only=Truewithout settingone_deterministic_belief_per_event=True. For sensors with multiple data sources reporting beliefs about the same event, beliefs across all sources were retained and summed together, causing event values to be double counted.This adds
one_deterministic_belief_per_event=Trueto the KPI search query so only a single deterministic belief per event is included in the aggregation, and adds a regression test intest_assets_api.py.