Tracking Experiments
Track your ML experiments
Experiment Tracking
Since there are many excellent experiment tracking tools, we should aim to prevent vendor lock-in by writing modular ML code that allows us to switch between different tools easily. That is precisely what ZenML does for us.
MLflow Experiment Tracking
To run our MLflow pipelines with ZenML, we first need to add MLflow into our ZenML MLOps stack. We first register a new experiment tracker with ZenML.
Weights & Biases
In order to register your new experiment tracker, you then need to define the three variables below to authorize yourself in W&B and to tell ZenML which entity/project you want to log to:
WANDB_ENTITY
: the entity (team or user) that owns the project you want to log to. If you are using W&B alone, just use your username here.WANDB_PROJECT
: the name of the W&B project you want to log to. If you have never used W&B before or want to start a new project, simply type the new project name here, e.g., "zenbytes".
The main difference to the MLflow example before is that W&B has no sklearn autolog functionality. Instead, we need to call wandb.log(...)
for each value we want to log to Weights & Biases.
Note that even though Weights & Biases is used in different steps within a pipeline, ZenML handles initializing everything and ensures that the experiment name is the same as the pipeline name and that the experiment run name is the same as the pipeline run name. This establishes a lineage between pipelines in ZenML and experiments in wandb.
Neptune
ZenML handles initializing Neptune and ensures that the experiment name is the same as the pipeline name, and that the experiment run is the same name as the pipeline run name. This establishes a lineage between pipelines in ZenML and experiments in Neptune.
To read a more detailed guide about how Experiment Trackers function in ZenML, [click here](../../component-gallery/experiment-trackers/experiment-trackers.md). {% endhint %}
Last updated