Linking model binaries/data to a Model
Artifacts generated during pipeline runs can be linked to models in ZenML. This connecting of artifacts provides lineage tracking and transparency into what data and models are used during training, evaluation, and inference.
There are a few ways to link artifacts:
Configuring the Model at a pipeline level
The easiest way is to configure the model
parameter on the @pipeline
decorator or @step
decorator:
This will automatically link all artifacts from this pipeline run to the specified model configuration.
Saving intermediate artifacts
It is often handy to save some of your work half-way: steps like epoch-based training can be running slow, and you don't want to lose any checkpoints along the way if an error occurs. You can use the save_artifact
utility function to save your data assets as ZenML artifacts. Moreover, if your step has the Model context configured in the @pipeline
or @step
decorator it will be automatically linked to it, so you can get easy access to it using the Model Control Plane features.
Link artifacts explicitly
If you would like to link an artifact to a model not from the step context or even outside a step, you can use the link_artifact_to_model
function. All you need is ready to link artifact and the configuration of a model.
Last updated