Skip to content

Differentiate in logging between fitting and applying a postprocessor #1146

Description

@hfrick

Re-using the location here means that we get the same message twice:

  • once for (potentially) fitting the postprocessor, and
  • once for applying the postprocessor to the model predictions

If it's not getting too noisy, we should disambiguate those two messages. Alternatively, we should send that message about postprocessing only once.

location <- glue::glue(
"preprocessor {iter_pre}/{num_iterations_pre}, model {iter_model}/{num_iterations_model}, postprocessing {iter_pred}/{num_iterations_pred}"
)
current_wflow <- .catch_and_log(
finalize_fit_post(
wflow_with_fitted_pre_and_model,
data_calibration = tailor_train_data,
grid = current_sched_post
),
control = static$control,
split_labels = split_labs,
location = location,
notes = notes
)
if (is_failure(current_wflow)) {
next
}
# to predict, use the post-processor directly rather than the
# workflow so that we don't have to generate the model predictions
# a second time
post_fit <- extract_postprocessor(current_wflow, estimated = TRUE)
post_pred <- .catch_and_log(
predict(post_fit, current_pred),
control = static$control,
split_labels = split_labs,
location = location,
notes = notes
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions