Create an RStudio Connect bundle for a vetiver model APISource:
Retrieve a specific version of a pin. Use
pin_versions()to find out which versions are available and when they were created.
A list of optional arguments passed to
vetiver_api()such as the endpoint
The path for the model API bundle to be created (can be used as the argument to
The two functions
vetiver_deploy_rsconnect() are alternatives to each other, providing
different strategies for deploying a vetiver model API to RStudio Connect.
library(pins) b <- board_temp(versioned = TRUE) cars_lm <- lm(mpg ~ ., data = mtcars) v <- vetiver_model(cars_lm, "cars_linear") vetiver_pin_write(b, v) #> Creating new version '20220706T142008Z-88e0b' #> Writing to pin 'cars_linear' #> #> Create a Model Card for your published model #> • Model Cards provide a framework for transparent, responsible reporting #> • Use the vetiver `.Rmd` template as a place to start #> This message is displayed once per session. ## when you pin to RStudio Connect, your pin name will be typically be like: ## "user.name/cars_linear" vetiver_create_rsconnect_bundle( b, "cars_linear", predict_args = list(debug = TRUE) ) #> Your rsconnect bundle has been created at: #> • /tmp/RtmpyJyfRg/bundle2948db92c02.tar.gz