Metadata constructors for vetiver_model()
object
Source: R/caret.R
, R/gam.R
, R/keras.R
, and 9 more
vetiver_create_meta.Rd
These are developer-facing functions, useful for supporting new model types.
The metadata stored in a vetiver_model()
object has four elements:
$user
, the metadata supplied by the user$version
, the version of the pin (which can beNULL
before pinning)$url
, the URL where the pin is located, if any$required_pkgs
, a character string of R packages required for prediction
Usage
# S3 method for train
vetiver_create_meta(model, metadata)
# S3 method for gam
vetiver_create_meta(model, metadata)
# S3 method for keras.engine.training.Model
vetiver_create_meta(model, metadata)
# S3 method for kproto
vetiver_create_meta(model, metadata)
# S3 method for luz_module_fitted
vetiver_create_meta(model, metadata)
vetiver_meta(user = list(), version = NULL, url = NULL, required_pkgs = NULL)
vetiver_create_meta(model, metadata)
# S3 method for default
vetiver_create_meta(model, metadata)
# S3 method for Learner
vetiver_create_meta(model, metadata)
# S3 method for ranger
vetiver_create_meta(model, metadata)
# S3 method for recipe
vetiver_create_meta(model, metadata)
# S3 method for model_stack
vetiver_create_meta(model, metadata)
# S3 method for workflow
vetiver_create_meta(model, metadata)
# S3 method for xgb.Booster
vetiver_create_meta(model, metadata)
Arguments
- model
A trained model, such as an
lm()
model or a tidymodelsworkflows::workflow()
.- metadata
A list containing additional metadata to store with the pin. When retrieving the pin, this will be stored in the
user
key, to avoid potential clashes with the metadata that pins itself uses.- user
Metadata supplied by the user
- version
Version of the pin
- url
URL for the pin, if any
- required_pkgs
Character string of R packages required for prediction