reichlab / covidHubUtils

Utility functions for the COVID-19 forecast hub
http://reichlab.io/covidHubUtils/
17 stars 16 forks source link

Warnings from unit tests related to scoring #371

Open elray1 opened 2 years ago

elray1 commented 2 years ago

When running unit tests, there are a lot of warnings coming from tests for scoring. Here's an example:

── Warning (test-score_forecasts.R:3323:3): interval coverage  is correct, 2 intervals, median and point, use_median_as_point FALSE ──
The following warnings were produced when checking inputs:
1.  Some forecasts have different numbers of rows (e.g. quantiles or samples). scoringutils found: 1, 5. This is not necessarily a problem, but make sure this is intended.
Backtrace:
  1. covidHubUtils::score_forecasts(...)
       at test-score_forecasts.R:3323:2
 13. scoringutils::score(data = joint_df_target)
 14. scoringutils::check_forecasts(data)

If these warnings are intended, we should check for that with expect_warning. If these warnings are not intended/necessary, we should update test cases to avoid them.