dynverse/dynbenchmark

Error: `id` must evaluate to column positions or names, not a function

pablommesas opened this issue · 0 comments

Hi, thanks again for a great job!

I ran into the following problem, not sure if I'm doing something wrong or it is an actual error. I also have a couple of questions regarding the overall structure of the benchmarking repository and how to execute it.

When running the dynbenchmark/scripts/06-benchmark/1-submit_jobs.R in line 23:

 methods <-
    dynwrap::get_ti_methods(method_ids, evaluate = FALSE) %>%
    mapdf(function(m) {
      l <- m$fun()
      l$fun <- m$fun
      l$type <- "function"
      l
    }) %>%
    list_as_tibble() %>%
    select(id, type, fun, everything())

As I see it after modifying the tibble obtained by dynwrap::get_ti_methods() with the mapdf() there is no column 'id'. Therefore, the following operation select() raises the following error:

Error: `id` must evaluate to column positions or names, not a function

This could be easily fixed by keeping the 'id' info in the mapdf(): l$id <- m$id

  methods <-
    dynwrap::get_ti_methods(method_ids, evaluate = FALSE) %>%
    mapdf(function(m) {
      l <- m$fun()
      l$fun <- m$fun
      l$type <- "function"
      l$id <- m$id
      l
    }) %>%
    list_as_tibble() %>%
    select(id, type, fun, everything())

Is this an actual error and proper fix, or I'm missing something?

  • In general what would be the proper way to try to recreate your results?
    By sequentially executing your scripts, results are stored in the 'derived' folder, but it seems that sometimes the scripts are pointing to the 'results' folder (initially empty) instead of the 'derived'. I solved this by downloading the dynbenchmark_results repository into the 'results' folder. Now, I'm a little confused about how the scripts and the 'derived' and 'results' folder interact with each other. Could you please give a couple of words on that?

Thanks again!!