Register a model to the given workspace. A registered model is a logical container for one or more files that make up your model. For example, if you have a model that's stored in multiple files, you can register them as a single model in your workspace. After registration, you can then download or deploy the registered model and receive all the files that were registered.

Models are identified by name and version. Each time you register a model with the same name as an existing one, your workspace's model registry assumes that it's a new version. The version is incremented, and the new model is registered under the same name.

register_model(workspace, model_path, model_name, tags = NULL,
  properties = NULL, description = NULL, child_paths = NULL)

Arguments

workspace

The Workspace object.

model_path

A string of the path on the local file system where the model assets are located. This can be a direct pointer to a single file or folder. If pointing to a folder, the child_paths parameter can be used to specify individual files to bundle together as the Model object, as opposed to using the entire contents of the folder.

model_name

A string of the name to register the model with.

tags

A named list of key-value tags to give the model, e.g. list("key" = "value")

properties

A named list of key-value properties to give the model, e.g. list("key" = "value").

description

A string of the text description of the model.

child_paths

A list of strings of child paths of a folder specified by model_name. Must be provided in conjunction with a model_path pointing to a folder; only the specified files will be bundled into the Model object.

Value

The Model object.

Examples

# Registering a model from a single file if (FALSE) { ws <- load_workspace_from_config() model <- register_model(ws, model_path = "my_model.rds", model_name = "my_model") }