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, datasets = NULL, tags = NULL, properties = NULL, description = NULL, child_paths = NULL, sample_input_dataset = NULL, sample_output_dataset = NULL, resource_configuration = NULL )
workspace | The |
---|---|
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 |
model_name | A string of the name to register the model with. |
datasets | A list of two-element lists where the first element is the
dataset-model relationship and the second is the corresponding dataset, e.g.
|
tags | A named list of key-value tags to give the model, e.g.
|
properties | A named list of key-value properties to give the model,
e.g. |
description | A string of the text description of the model. |
child_paths | A list of strings of child paths of a folder specified
by |
sample_input_dataset | Sample input dataset for the registered model. |
sample_output_dataset | Sample output dataset for the registered model. |
resource_configuration | `ResourceConfiguration`` object to run the registered model. |
The Model
object.
Registering a model from a single file:
ws <- load_workspace_from_config() model <- register_model(ws, model_path = "my_model.rds", model_name = "my_model", datasets = list(list("training", train_dataset)))
resource_configuration()