You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have run into errors of loading duplicate forecasts in a few calls to load_latest_forecasts(). This appears to be due to a misspecification and/or a mis-interpretation of the forecast_date_window_size argument. For example, when running the below code, the expected behavior was that it would return one "latest forecast" submitted within between dates of
"2020-11-17" to "2020-11-23" (seven days inclusive), and
"2020-11-24" to "2020-11-30" (seven days inclusive).
This was based on reading the documentation which says "forecast_date_window_size: The number of days across which to look for recent forecasts. Defaults to 1, which means to only look at the last_forecast_date."
However, it seems that when you let forecast_date_window_size = 7 it actually looks back 8 days. IHME-CurveFit did not submit a model between 2020-11-24 and 2020-11-30 but did submit one on 2020-11-23. Note that the call to load_latest_forecasts() retrieves the same specified forecast row in both cycles through map_dfr() because it includes 2020-11-23 in the "window" when latest_forecast_date is 2020-11-30 and window is 7.
My suggestion is to simply update the function so that the default for forecast_date_window_size is zero and the documentation to reflect that this looks for forecasts on the latest_forecast_date only.
Discovered in #91 .
We have run into errors of loading duplicate forecasts in a few calls to load_latest_forecasts(). This appears to be due to a misspecification and/or a mis-interpretation of the forecast_date_window_size argument. For example, when running the below code, the expected behavior was that it would return one "latest forecast" submitted within between dates of
"2020-11-17" to "2020-11-23" (seven days inclusive), and
"2020-11-24" to "2020-11-30" (seven days inclusive).
This was based on reading the documentation which says "forecast_date_window_size: The number of days across which to look for recent forecasts. Defaults to 1, which means to only look at the last_forecast_date."
However, it seems that when you let forecast_date_window_size = 7 it actually looks back 8 days. IHME-CurveFit did not submit a model between 2020-11-24 and 2020-11-30 but did submit one on 2020-11-23. Note that the call to load_latest_forecasts() retrieves the same specified forecast row in both cycles through map_dfr() because it includes 2020-11-23 in the "window" when latest_forecast_date is 2020-11-30 and window is 7.
My suggestion is to simply update the function so that the default for forecast_date_window_size is zero and the documentation to reflect that this looks for forecasts on the latest_forecast_date only.
@elray1 is this a reasonable interpretation/fix?
The text was updated successfully, but these errors were encountered: