When would you want to use it?
Weights & Biases is a very popular platform that you would normally use in the iterative ML experimentation phase to track and visualize experiment results. That doesn’t mean that it cannot be repurposed to track and visualize the results produced by your automated pipeline runs, as you make the transition towards a more production oriented workflow. You should use the Weights & Biases Experiment Tracker:- if you have already been using Weights & Biases to track experiment results for your project and would like to continue doing so as you are incorporating MLOps workflows and best practices in your project through ZenML.
- if you are looking for a more visually interactive way of navigating the results produced from your ZenML pipeline runs (e.g. models, metrics, datasets)
- if you would like to connect ZenML to Weights & Biases to share the artifacts and metrics logged by your pipelines with your team, organization or external stakeholders
How do you deploy it?
The Weights & Biases Experiment Tracker flavor is provided by the MLflow ZenML integration, you need to install it on your local machine to be able to register a Weights & Biases Experiment Tracker and add it to your stack:Authentication Methods
You need to configure the following credentials for authentication to the Weights & Biases platform:-
api_key
: Mandatory API key token of your Weights & Biases account. -
project_name
: The name of the project where you’re sending the new run. If the project is not specified, the run is put in an “Uncategorized” project. -
entity
: An entity is a username or team name where you’re sending runs. This entity must exist before you can send runs there, so make sure to create your account or team in the UI before starting to log runs. If you don’t specify an entity, the run will be sent to your default entity, which is usually your username.
zenml secret register
command:
How do you use it?
To be able to log information from a ZenML pipeline step using the Weights & Biases Experiment Tracker component in the active stack, you need to enable an experiment tracker using the@step
decorator. Then use Weights & Biases logging or auto-logging capabilities as you would normally do, e.g.:
Additional configuration
For additional configuration of the Weights & Biases experiment tracker, you can passWandbExperimentTrackerSettings
to overwrite the wandb.Settings or pass additional tags for your runs: