-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shuffle code around in preparation to add support for actually computing scores #8
Conversation
@@ -120,34 +120,26 @@ validate_config_targets <- function(webevals_config, task_groups, task_id_names) | |||
} | |||
|
|||
# check that metrics are valid for the available output types | |||
output_types_for_target <- purrr::map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved computation of output_types_for_target
and target_is_ordinal
into their own functions in utils-hub_tasks_config.R
. These functions are now called from within get_metric_name_to_output_type
.
Slightly awkwardly, to support issuing informative errors, we also compute them below if we need to issue the error.
@@ -251,61 +243,6 @@ validate_config_task_id_text <- function(webevals_config, task_groups, task_id_n | |||
} | |||
|
|||
|
|||
#' Get a data frame with 1 row for each metric, matching the metric with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_metric_name_to_output_type
and get_standard_metrics
moved to utils-metrics.R
. I'm going to need these functions in the code to compute scores, so it's better to have them in a utils
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I had one question regarding the method for checking for ordinal target types and some stylistic suggestions WRT names, but both can be ignored.
get_target_is_ordinal --> is_target_ordinal Co-authored-by: Zhian N. Kamvar <zkamvar@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
utils-metrics.R
and add unit testsutils-hub_tasks_config.R