Skip to content

Conversation

@nmdefries
Copy link
Contributor

@nmdefries nmdefries commented Jul 25, 2023

Format differences in forecaster input files means that value and quantile fields can't all be read as numeric. To avoid errors, read as character and cast to double later. Also specify several NA-equivalent values to get get_forecaster_predictions working in more cases and to avoid warnings when casting to double in get_forecaster_predictions_alt.

The NA addition fixes get_forecaster_predictions for 8 of the 10 forecasters where read fails for some dates. To fix the remaining failures (for PSI-DRAFT and PSI-DICE for some dates), apply the same character->double conversion as above.

@nmdefries nmdefries marked this pull request as ready for review July 26, 2023 21:57
Copy link
Collaborator

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

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

Looks good. Given how varied the data seems to be, actually pretty nice that we can handle it all with fread and a little bit of manual conversion.

@nmdefries
Copy link
Contributor Author

@dshemetov could you merge this?

@dshemetov dshemetov merged commit 3f6548f into main Jul 28, 2023
@dshemetov dshemetov deleted the ndefries/fread-types branch July 28, 2023 17:35
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.

3 participants