Skip to content

Experiment Trackers

zenml.experiment_trackers special

Experiment trackers let you track your ML experiments.

They log the parameters used and allow you to compare between runs. In the ZenML world, every pipeline run is considered an experiment, and ZenML facilitates the storage of experiment results through ExperimentTracker stack components. This establishes a clear link between pipeline runs and experiments.

base_experiment_tracker

Base class for all ZenML experiment trackers.

BaseExperimentTracker (StackComponent, ABC)

Base class for all ZenML experiment trackers.

Source code in zenml/experiment_trackers/base_experiment_tracker.py
class BaseExperimentTracker(StackComponent, ABC):
    """Base class for all ZenML experiment trackers."""

    @property
    def config(self) -> BaseExperimentTrackerConfig:
        """Returns the config of the experiment tracker.

        Returns:
            The config of the experiment tracker.
        """
        return cast(BaseExperimentTrackerConfig, self._config)
config: BaseExperimentTrackerConfig property readonly

Returns the config of the experiment tracker.

Returns:

Type Description
BaseExperimentTrackerConfig

The config of the experiment tracker.

BaseExperimentTrackerConfig (StackComponentConfig) pydantic-model

Base config for experiment trackers.

Source code in zenml/experiment_trackers/base_experiment_tracker.py
class BaseExperimentTrackerConfig(StackComponentConfig):
    """Base config for experiment trackers."""

BaseExperimentTrackerFlavor (Flavor)

Base class for all ZenML experiment tracker flavors.

Source code in zenml/experiment_trackers/base_experiment_tracker.py
class BaseExperimentTrackerFlavor(Flavor):
    """Base class for all ZenML experiment tracker flavors."""

    @property
    def type(self) -> StackComponentType:
        """Type of the flavor.

        Returns:
            StackComponentType: The type of the flavor.
        """
        return StackComponentType.EXPERIMENT_TRACKER

    @property
    def config_class(self) -> Type[BaseExperimentTrackerConfig]:
        """Config class for this flavor.

        Returns:
            The config class for this flavor.
        """
        return BaseExperimentTrackerConfig

    @property
    @abstractmethod
    def implementation_class(self) -> Type[StackComponent]:
        """Returns the implementation class for this flavor.

        Returns:
            The implementation class for this flavor.
        """
        return BaseExperimentTracker
config_class: Type[zenml.experiment_trackers.base_experiment_tracker.BaseExperimentTrackerConfig] property readonly

Config class for this flavor.

Returns:

Type Description
Type[zenml.experiment_trackers.base_experiment_tracker.BaseExperimentTrackerConfig]

The config class for this flavor.

implementation_class: Type[zenml.stack.stack_component.StackComponent] property readonly

Returns the implementation class for this flavor.

Returns:

Type Description
Type[zenml.stack.stack_component.StackComponent]

The implementation class for this flavor.

type: StackComponentType property readonly

Type of the flavor.

Returns:

Type Description
StackComponentType

The type of the flavor.