Develop a custom experiment tracker

Learning how to develop a custom experiment tracker.

Before diving into the specifics of this component type, it is beneficial to familiarize yourself with our general guide to writing custom component flavors in ZenML. This guide provides an essential understanding of ZenML's component flavor concepts.

Base abstraction in progress!

We are actively working on the base abstraction for the Experiment Tracker, which will be available soon. As a result, their extension is not recommended at the moment. When you are selecting an Experiment Tracker for your stack, you can use one of the existing flavors.

If you need to implement your own Experiment Tracker flavor, you can still do so, but keep in mind that you may have to refactor it when the base abstraction is released.

Build your own custom experiment tracker

If you want to create your own custom flavor for an experiment tracker, you can follow the following steps:

Create a class that inherits from the BaseExperimentTracker class and implements the abstract methods.

If you need any configuration, create a class that inherits from the BaseExperimentTrackerConfig class and add your configuration parameters.

Bring both the implementation and the configuration together by inheriting from the BaseExperimentTrackerFlavor class.

Once you are done with the implementation, you can register it through the CLI. Please ensure you point to the flavor class via dot notation:

zenml experiment-tracker flavor register <path.to.MyExperimentTrackerFlavor>

For example, if your flavor class MyExperimentTrackerFlavor is defined in flavors/my_flavor.py, you'd register it by doing:

zenml experiment-tracker flavor register flavors.my_flavor.MyExperimentTrackerFlavor