eco4cast / neon4cast

A helper R package for the neon4cast challenge
Other
7 stars 7 forks source link

speed up score_it function with parallelization #6

Closed cboettig closed 2 years ago

cboettig commented 2 years ago

@rqthomas well haven't done anything clever yet to avoid re-computation, but realized score_it is easily parallelized. (also suppressing print messages from readr really speeds up things when reading 1000s of files, so added that as well).

Minor note as well, may be worth double-checking: I fixed what looks like a typo in crps_log_score: "forest_start_time" instead of "forecast_start_time".

with parallel execution and the readr msg fix, I can parse and re-score the nearly 2K forecast files in a few minutes. May still take a whack at cleaning up the logic in crps_log_score... realizing it is something of a pity we didn't go with long form for forecasts so we need pivot_longer repeatedly....