Closed PathosEthosLogos closed 5 months ago
I was digging into it a bit. There are two places where rank_results()
calls for the column result
after running tune_grid()
.
First, it runs into problem at collate_metrics()
in source misc.R
.
Then it calls for the column twice again in rank_results()
types <- x %>% full_join(wflow_info, by = "wflow_id") %>%
mutate(is_race = map_lgl(**result**, ~inherits(.x,
"tune_race")), num_rs = map_int(**result**x, get_num_resamples)) %>%
select(wflow_id, is_race, num_rs)
ranked <- full_join(results, types, by = "wflow_id") %>%
filter(.metric == metric)
It seems that tune_grid()
should be creating the column result
but it does not. Was there some new update that changed this? It has been working.
Thanks for the issue @PathosEthosLogos!
tune_grid()
doesn't create a column called result
and hasn't before; workflow_map()
creates that column, and its entries are the outputs of each call to tune_grid()
.
The issue you're seeing here is that rank_results()
is a function defined for workflow sets and doesn't know what to do with a tuning result like tuned_model
. In workflowsets, we should better check inputs and error more informatively there.
If you want output similar to rank_results()
output for tuning results, you could try select_best()
or collect_metrics()
!
Related to #131.
Created on 2023-12-26 with reprex v2.0.2