-
Notifications
You must be signed in to change notification settings - Fork 48
Dead exported function: finalize_workflow_preprocessor() #1157
Copy link
Copy link
Open
Labels
upkeepmaintenance, infrastructure, and similarmaintenance, infrastructure, and similar
Description
Summary
finalize_workflow_preprocessor() is exported (via @rdname tune-internal-functions) but has zero callers in R/, tests/, or inst/.
Location
Lines 115 to 129 in 3544816
| #' @export | |
| #' @rdname tune-internal-functions | |
| finalize_workflow_preprocessor <- function(workflow, grid_preprocessor) { | |
| # Already finalized, nothing to tune | |
| if (ncol(grid_preprocessor) == 0L) { | |
| return(workflow) | |
| } | |
| recipe <- extract_preprocessor(workflow) | |
| recipe <- merge(recipe, grid_preprocessor)$x[[1]] | |
| workflow <- set_workflow_recipe(workflow, recipe) | |
| workflow | |
| } |
What it does
Finalizes a workflow's recipe preprocessor by merging tuning parameter values from a grid into the recipe. If the grid has no columns, it returns the workflow unchanged.
Why it's dead
The current loop architecture uses finalize_fit_pre() (in R/loop_over_all_stages-helpers.R) instead, which handles preprocessor finalization as part of the broader fit pipeline.
Suggested fix
Check whether any downstream packages (e.g., finetune, workflowsets) call this function. If not, deprecate it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
upkeepmaintenance, infrastructure, and similarmaintenance, infrastructure, and similar