Promote a Model
Stages and Promotion
Model stages are a way to model the progress that different versions takes through various stages in its lifecycle. A ZenML Model version can be promoted to a different stage through the Dashboard, the ZenML CLI or code.
This is a way to signify the progression of your model version through the ML lifecycle and are an extra layer of metadata to identify the state of a particular model version. Possible options for stages are:
staging
: This version is staged for production.production
: This version is running in a production setting.latest
: The latest version of the model. This is a virtual stage to retrieve the latest version only - versions cannot be promoted tolatest
.archived
: This is archived and no longer relevant. This stage occurs when a model moves out of any other stage.
Your own particular business or use case logic will determine which model version you choose to promote, and you can do this in the following ways:
Promotion via CLI
This is probably the least common way that you'll use, but it's still possible and perhaps might be useful for some use cases or within a CI system, for example. You simply use the following CLI subcommand:
Promotion via Cloud Dashboard
This feature is not yet available, but soon you will be able to promote your model versions directly from the ZenML Pro dashboard.
Promotion via Python SDK
This is the most common way that you'll use to promote your models. You can see how you would do this here:
Within a pipeline context, you would get the model from the step context but the mechanism for setting the stage is the same.
Fetching model versions by stage
The stage can be used to load the right model version, by passing them in as a version
:
Last updated