save_model_data: Create an Object, Deployable to the Verta System

Description Usage Arguments Value

View source: R/model_io.R

Description

This function gathers R objects from the workspace, needed to deploy an API endpoint and is intended to be used with log_model. It simply gathers all needed objects, puts them in a list, and saves the list to disk. Then that file is logged with run$log_model. This object can then be turned into a docker context with createDockerContextZip

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
save_model_data(
  file_to_save_at,
  modelObject,
  required_packages = NULL,
  additional_objects = list(),
  plumber_template_location = file.path(path.package("vertaReticulateClient"),
    "plumber_sample.R"),
  runner_template_location = file.path(path.package("vertaReticulateClient"),
    "to_run.R")
)

Arguments

file_to_save_at

target file path

required_packages

character vector of required packages to call the predict function

plumber_template_location

- a location of the plumber template file- by default taken from the package directory

runner_template_location

- a location of the runner template file- by default taken from the package

modFile

the fit model object

Value

nothing


botchkoAI/vertaReticulateClient documentation built on Dec. 19, 2021, 10:50 a.m.