Visualizers
zenml.visualizers
special
The visualizers
module offers a way of constructing and displaying
visualizations of steps and pipeline results. The BaseVisualizer
class is at
the root of all the other visualizers, including options to view the results of
pipeline runs, steps and pipelines themselves.
base_pipeline_run_visualizer
BasePipelineRunVisualizer (BaseVisualizer)
The base implementation of a ZenML Pipeline Run Visualizer.
Source code in zenml/visualizers/base_pipeline_run_visualizer.py
class BasePipelineRunVisualizer(BaseVisualizer):
"""The base implementation of a ZenML Pipeline Run Visualizer."""
@abstractmethod
def visualize(
self, object: PipelineRunView, *args: Any, **kwargs: Any
) -> None:
"""Method to visualize pipeline runs."""
visualize(self, object, *args, **kwargs)
Method to visualize pipeline runs.
Source code in zenml/visualizers/base_pipeline_run_visualizer.py
@abstractmethod
def visualize(
self, object: PipelineRunView, *args: Any, **kwargs: Any
) -> None:
"""Method to visualize pipeline runs."""
base_pipeline_visualizer
BasePipelineVisualizer (BaseVisualizer)
The base implementation of a ZenML Pipeline Visualizer.
Source code in zenml/visualizers/base_pipeline_visualizer.py
class BasePipelineVisualizer(BaseVisualizer):
"""The base implementation of a ZenML Pipeline Visualizer."""
@abstractmethod
def visualize(self, object: PipelineView, *args: Any, **kwargs: Any) -> Any:
"""Method to visualize pipelines."""
visualize(self, object, *args, **kwargs)
Method to visualize pipelines.
Source code in zenml/visualizers/base_pipeline_visualizer.py
@abstractmethod
def visualize(self, object: PipelineView, *args: Any, **kwargs: Any) -> Any:
"""Method to visualize pipelines."""
base_step_visualizer
BaseStepVisualizer (BaseVisualizer)
The base implementation of a ZenML Step Visualizer.
Source code in zenml/visualizers/base_step_visualizer.py
class BaseStepVisualizer(BaseVisualizer):
"""The base implementation of a ZenML Step Visualizer."""
@abstractmethod
def visualize(self, object: StepView, *args: Any, **kwargs: Any) -> Any:
"""Method to visualize steps."""
@staticmethod
def running_in_notebook() -> bool:
"""Detect whether we're running in a Jupyter notebook or not"""
try:
from IPython import get_ipython # type: ignore
if get_ipython() is None:
# IPython is installed but not running from a notebook
return False
else:
return True
except ImportError:
# We do not even have IPython installed
return False
running_in_notebook()
staticmethod
Detect whether we're running in a Jupyter notebook or not
Source code in zenml/visualizers/base_step_visualizer.py
@staticmethod
def running_in_notebook() -> bool:
"""Detect whether we're running in a Jupyter notebook or not"""
try:
from IPython import get_ipython # type: ignore
if get_ipython() is None:
# IPython is installed but not running from a notebook
return False
else:
return True
except ImportError:
# We do not even have IPython installed
return False
visualize(self, object, *args, **kwargs)
Method to visualize steps.
Source code in zenml/visualizers/base_step_visualizer.py
@abstractmethod
def visualize(self, object: StepView, *args: Any, **kwargs: Any) -> Any:
"""Method to visualize steps."""
base_visualizer
BaseVisualizer
Base class for all ZenML Visualizers.
Source code in zenml/visualizers/base_visualizer.py
class BaseVisualizer:
"""Base class for all ZenML Visualizers."""
@abstractmethod
def visualize(self, object: Any, *args: Any, **kwargs: Any) -> None:
"""Method to visualize objects."""
visualize(self, object, *args, **kwargs)
Method to visualize objects.
Source code in zenml/visualizers/base_visualizer.py
@abstractmethod
def visualize(self, object: Any, *args: Any, **kwargs: Any) -> None:
"""Method to visualize objects."""