Registering a Model
Last updated
Last updated
Registering models can be done in a number of ways depending on your specific needs. You can explicitly register models using the CLI or the Python SDK, or you can just allow ZenML to implicitly register your models as part of a pipeline run.
If you are using ZenML Pro, you already have access to a dashboard interface that allows you to register models.
Registering models using the CLI is as straightforward as the following command:
You can view some of the options of what can be passed into this command by running zenml model register --help
but since you are using the CLI outside a pipeline run the arguments you can pass in are limited to non-runtime items. You can also associate tags with models at this point, for example, using the --tag
option.
ZenML Pro can register their models directly from the cloud dashboard interface.
You can register a model using the Python SDK as follows:
The most common use case for registering models is to do so implicitly as part of a pipeline run. This is done by specifying a Model
object as part of the model
argument of the @pipeline
decorator.
As an example, here we have a training pipeline which orchestrates the training of a model object, storing datasets and the model object itself as links within a newly created Model version. This integration is achieved by configuring the pipeline within a Model Context using Model
. The name is specified, while other fields remain optional for this task.
Running the training pipeline creates a new model version, all while maintaining a connection to the artifacts.