Recipe files are treated as untrusted input. The complete document is
decoded and validated before supported constructors are applied. Importing
bake configurations into an unprepared recipe never runs analysis unless
prepare = TRUE is supplied explicitly.
Usage
import_steps(
rec,
file,
prepare = FALSE,
parallel = TRUE,
workers = future::availableCores(constraints = "connections-16")
)Arguments
- rec
A
Recipe()orPrepRecipe()object.- file
Input JSON path.
- prepare
Whether an unprepared recipe may run
prep()when the file contains bake configurations. Defaults toFALSE.- parallel
Passed to
prep()only whenprepare = TRUE.- workers
Passed to
prep()only whenprepare = TRUE.
Examples
data(metaHIV_phy)
configured <- recipe(metaHIV_phy) |>
add_model(~ RiskGroup2, targets = "RiskGroup2", tax_level = "Species") |>
step_filter_by_prevalence(threshold = 0.1)
path <- tempfile(fileext = ".json")
export_steps(configured, path)
restored <- import_steps(recipe(metaHIV_phy), path)
