yardstick
yardstick copied to clipboard
Guidelines on using custom metrics with tune parallel_over?
It would be great if clearer warnings and guidelines could be offered on how to use custom metrics from yardstick with tune parallel_over option? Personally, it took quite a while to figure out that the error message:
! no applicable method for 'mse' applied to an object of class "c('grouped_df', 'tbl_df', 'tbl', 'data.fram..
despite the script itself containing a mse <- function(data, ...) { UseMethod("mse")} call?
What I am suggesting is:
- yardstick documentation at https://www.tidymodels.org/learn/develop/metrics/: mention the problem?
- tune: emit a warning if parallel is used with custom metrics?
- in general: provide guidelines on how to handle the problem? The solution in https://github.com/tidymodels/tune/issues/479 to write a specific package just for the function seems quite heavy?
Thanks!
following-up on this, are there any guidelines on how to handle custom metrics with parallel processing?
#479 mentions writing a separate package just for the function, while #937 mentions a "non-working draft", so I was wondering what are the official guidelines on this?
thanks!