Developing and using visualizers
An image speaks a thousand words.

What is a visualizer?

Sometimes it makes sense in the post-execution workflow to actually visualize step outputs. ZenML has a standard, extensible interface for all visualizers:
class BaseVisualizer:
"""Base class for all ZenML Visualizers."""
def visualize(self, object: Any, *args: Any, **kwargs: Any) -> None:
"""Method to visualize objects."""
The object can currently be a StepView, a PipelineRunView , or a PipelineView. (These are all different post-execution objects.)

Examples of visualizations

Lineage with dash

from zenml.repository import Repository
from zenml.integrations.dash.visualizers.pipeline_run_lineage_visualizer import (
repo = Repository()
latest_run = repo.get_pipelines()[-1].runs[-1]
It produces the following visualization:
Lineage Diagram

Statistics with facets

from zenml.integrations.facets.visualizers.facet_statistics_visualizer import (
It produces the following visualization:
Statistics for boston housing dataset

Distributions with whylogs

repo = Repository()
pipe = repo.get_pipelines()[-1]
whylogs_outputs = pipe.runs[-1].get_step(name=step_name)
It produces the following visualization:
WhyLogs visualization

Drift with evidently

from zenml.integrations.evidently.visualizers import EvidentlyVisualizer
repo = Repository()
pipe = repo.get_pipelines()[-1]
evidently_outputs = pipe.runs[-1].get_step(name="drift_detector")
It produces the following visualization:
Evidently Drift Detection