Skip to content

Commit

Permalink
pass call to tune::first_eval_time() (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch authored Jan 25, 2024
1 parent e86f4b0 commit b18c9c5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: finetune
Title: Additional Functions for Model Tuning
Version: 1.1.0.9005
Version: 1.1.0.9006
Authors@R: c(
person("Max", "Kuhn", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2402-136X")),
Expand Down
7 changes: 6 additions & 1 deletion R/tune_race_anova.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,12 @@ tune_race_anova_workflow <-
opt_metric_name <- opt_metric$metric
maximize <- opt_metric$direction == "maximize"

opt_metric_time <- tune::first_eval_time(metrics, opt_metric_name, eval_time)
opt_metric_time <- tune::first_eval_time(
metrics,
opt_metric_name,
eval_time,
call = call
)

racing_obj_log(opt_metric_name, opt_metric$direction, control, opt_metric_time)

Expand Down
7 changes: 6 additions & 1 deletion R/tune_race_win_loss.R
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,12 @@ tune_race_win_loss_workflow <-
opt_metric_name <- opt_metric$metric
maximize <- opt_metric$direction == "maximize"

opt_metric_time <- tune::first_eval_time(metrics, opt_metric_name, eval_time)
opt_metric_time <- tune::first_eval_time(
metrics,
opt_metric_name,
eval_time,
call = call
)

racing_obj_log(opt_metric_name, opt_metric$direction, control, opt_metric_time)

Expand Down
7 changes: 6 additions & 1 deletion R/tune_sim_anneal.R
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,12 @@ tune_sim_anneal_workflow <-
maximize <- opt_metric$direction == "maximize"

eval_time <- tune::check_eval_time_arg(eval_time, metrics, call = call)
opt_metric_time <- tune::first_eval_time(metrics, opt_metric_name, eval_time)
opt_metric_time <- tune::first_eval_time(
metrics,
opt_metric_name,
eval_time,
call = call
)

if (is.null(param_info)) {
param_info <- extract_parameter_set_dials(object)
Expand Down

0 comments on commit b18c9c5

Please sign in to comment.