vetiver_deploy_rsconnect: Deploy a vetiver model API to RStudio Connect

Description Usage Arguments Value See Also Examples

View source: R/deploy-rsconnect.R

Description

Use vetiver_deploy_rsconnect() to deploy a vetiver_model() that has been versioned and stored via vetiver_pin_write() as a Plumber API on RStudio Connect.

Usage

1
2
3
4
5
6
7
8
vetiver_deploy_rsconnect(
  board,
  name,
  version = NULL,
  predict_args = list(),
  appTitle = glue::glue("{name} model API"),
  ...
)

Arguments

board

A pin board, created by board_folder(), board_rsconnect(), board_url() or another board_ function.

name

Pin name.

version

Retrieve a specific version of a pin. Use pin_versions() to find out which versions are available and when they were created.

predict_args

A list of optional arguments passed to vetiver_pr_predict() such as the endpoint path or prediction type.

appTitle

The API title on RStudio Connect. Use the default based on name, or pass in your own title.

...

Other arguments passed to rsconnect::deployApp() such as account or launch.browser.

Value

The deployment success (TRUE or FALSE), invisibly.

See Also

vetiver_write_plumber()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(pins)
tmp <- tempfile()
b <- board_temp(versioned = TRUE)
cars_lm <- lm(mpg ~ ., data = mtcars)
v <- vetiver_model(cars_lm, "cars_linear")
vetiver_pin_write(b, v)

if (FALSE) {
vetiver_deploy_rsconnect(b, "cars_linear", predict_args = list(debug = TRUE))
}

tidymodels/vetiver documentation built on Jan. 14, 2022, 7:32 p.m.