Publish a model from Model Manager to a given destination

publish_model(
  session,
  model,
  name,
  destination = "maslocal",
  exact = TRUE,
  force = FALSE,
  publishInfo = FALSE,
  ...
)

Arguments

session

viya_connection object, obtained through session function

model

MMmodel object, project ID or model name. If name, will try to find a single model with exact name match. See exact parameter

name

publish endpoint, if missing, the model name will be used

destination

the publish destination

exact

the filter query should use "contains" for partial match or "eq" for exact match

force

force replace of a published model with the same name

publishInfo

boolean, returns the publishInfo object instead of MASmodule object

...

additional parameters to be passed to httr::POST such as httr::add_headers

Value

A MASmodule object from get_masmodule(). If return_publish_info = TRUE or destination != maslocal, returns a publishInfo object

Examples


if (FALSE) { # \dontrun{
mas_module <- publish_model(sess, mod, "maslocal", "R_model_published")

scored <- masScore(sess, mas_module, hmeq[1,-1])
} # }