Fetching Historic Runs
Interact with Past Runs inside a Step
This is an older version of the ZenML documentation. To check the latest version please visit https://docs.zenml.io
Fetching historic runs
The need to fetch historic runs
Sometimes, it is necessary to fetch information from previous runs in order to make a decision within a currently executing step. Examples of this:
Fetch the best model evaluation results from all past pipeline runs to decide whether to deploy a newly-trained model.
Fetching a model out of a list of trained models.
Fetching the latest model produced by a different pipeline to run an inference on.
Utilizing StepContext
StepContext
ZenML allows users to fetch historical parameters and artifacts using the StepContext
fixture.
As an example, see this step that uses the StepContext
to query the metadata store while running a step. We use this to evaluate all models of past training pipeline runs and store the current best model. In our inference pipeline, we could then easily query the metadata store to fetch the best performing model.
Just like that you are able to compare runs with each other from within the run itself.
Summary in Code
Last updated