-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from hubverse-org/93/add-derived-tid-arg
93/add derived_task_id argument
- Loading branch information
Showing
5 changed files
with
251 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
get_round_config <- function(config_tasks, round_id) { | ||
round_idx <- hubUtils::get_round_idx(config_tasks, round_id) | ||
purrr::pluck( | ||
config_tasks, | ||
"rounds", | ||
round_idx | ||
) | ||
} | ||
|
||
get_round_output_types <- function(config_tasks, round_id) { | ||
round_config <- get_round_config(config_tasks, round_id) | ||
purrr::map( | ||
round_config[["model_tasks"]], | ||
~ .x[["output_type"]] | ||
) | ||
} | ||
|
||
get_round_output_type_names <- function(config_tasks, round_id, | ||
collapse = TRUE) { | ||
out <- get_round_output_types(config_tasks, round_id) %>% | ||
purrr::map(names) | ||
|
||
if (collapse) { | ||
purrr::flatten_chr(out) %>% | ||
unique() | ||
} else { | ||
out | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters