load_model()
Load a model saved with save_model()
Reads <name>.rds from the models folder with readRDS(). framework-py saves models as <name>.pkl, which R cannot read.
Usage
load_model(name, public = NULL)
Arguments
| Name | Default | Description |
|---|---|---|
| name |
The name it was saved under, without extension. |
|
| public | NULL |
Which models folder to read in a project with private and
public output folders: the public one ( |
Value
The model.
Details
A file that no longer matches the hash save_model() recorded in framework.db loads with a warning.
Examples
Not run
if (FALSE) {
model <- lm(mpg ~ hp + wt, data = mtcars, model = FALSE)
save_model(model, "mpg_regression")
model <- load_model("mpg_regression")
}