Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #500: Reduce messages in bias_quantile() #501

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

nikosbosse
Copy link
Contributor

@nikosbosse nikosbosse commented Nov 24, 2023

Fixes #500

Currently, bias_quantile() uses an internal helper function, bias_quantile_single_vector() to compute bias for a single forecast.

This helper functions throws a message if the median is not part of the quantile levels provided. That means that a single call to bias_quantile() can produce a lot of messages, as the message is repeated every time the helper is called.
This PR

  • moves the message from the helper function to bias_quantile(), thus only getting one message for a single call to bias_quantile().
  • adds a test for this

This is related to #418 (and only addresses a small part of the larger problem), but is in my opinion definitely an improvement over what we currently have.

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b778f8a) 81.21% compared to head (5f182da) 81.22%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #501      +/-   ##
===========================================
+ Coverage    81.21%   81.22%   +0.01%     
===========================================
  Files           20       20              
  Lines         1725     1726       +1     
===========================================
+ Hits          1401     1402       +1     
  Misses         324      324              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

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

Good idea. Looks good.

@nikosbosse nikosbosse merged commit accb868 into develop Nov 28, 2023
9 of 11 checks passed
@nikosbosse nikosbosse deleted the improve-bias-quantile branch November 28, 2023 12:38
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.

2 participants