🗄️Handle Data/Artifacts
Step outputs in ZenML are stored in the artifact store. This enables caching, lineage and auditability. Using type annotations helps with transparency, passing data between steps, and serializing/des
For best results, use type annotations for your outputs. This is good coding practice for transparency, helps ZenML handle passing data between steps, and also enables ZenML to serialize and deserialize (referred to as 'materialize' in ZenML) the data.
In this code, we define two steps: load_data
and train_model
. The load_data
step takes an integer parameter and returns a dictionary containing training data and labels. The train_model
step receives the dictionary from load_data
, extracts the features and labels, and trains a model (not shown here).
Finally, we define a pipeline simple_ml_pipeline
that chains the load_data
and train_model
steps together. The output from load_data
is passed as input to train_model
, demonstrating how data flows between steps in a ZenML pipeline.
Last updated