StackComponent
class:BaseModel
is helping us to configure and serialize these components while allowing us to add a validation layer to each stack component instance/implementation.StackComponent
implementation. As you can see, each instance of a StackComponent
needs to include a name
and an auto-generated uuid
. These variables will be tracked when we serialize the stack component object. (You can exclude an instance configuration parameter from the serialization by giving it a name which starts with _
.)ClassVar[..]
, which are also excluded from the serialization. Each StackComponent
implementation features two important class variables called the TYPE
and the FLAVOR
. The TYPE
is utilized when we set up the base implementation for a specific type of stack component whereas the FLAVOR
parameter is used to denote different flavors (which we will cover in the next section).BaseArtifactStore
as an example:BaseArtifactStore
sets the correct TYPE
, while introducing a new instance variable called path
and class variable called SUPPORTED_SCHEMES
, which will be used by all the subclasses of this base implementation.LocalArtifactStore
:LocalArtifactStore
inherits from the corresponding base abstraction BaseArtifactStore
and implements a local version. While creating this class, it is critical to set the FLAVOR
class variable, as we will use it as a reference when we create an instance of this stack component.register
command. When using this command, you need to provide a NAME
for the instance and the required instance configuration parameters as --param=value
.zenml <stack-component-type> --help
" or visit our CLI docs.zenml init
already comes with an initial active default
stack, which features a local artifact store, a local metadata store, and a local orchestrator. You can see all of your stacks with the following command:zenml stack --help
" or visit our CLI docs.prepare_pipeline_deployment
method of each stack component, and you can use this method as an entrypoint to configure your stack components even further.StackComponent
also allows you to control the state of your stack component: