How to log multiple metrics in the same plot?

Hey! Thanks for the amazing platform, it has been a game changer for me : )

I can’t seem to find a way to log multiple metrics at each time-step and visualise them all in the same plot (automatically).

I am aware that one could select different metrics to overlap in the same plot from the dashboard (Log multiple variables at the same plot), but in my setup I have 50 different metrics that I would like to overlay (I am logging parallel training runs from different networks) – that is a bit too much to do manually.

Is there any possible workaround that I missed?

NOTE: I would like to log these values incrementally, I am aware one could plot the lines at any stage by keeping track of the history of the logs. But that defies the purpose of the WandB framework…

Hello @flavio-martinelli , thank you for writing in and happy to help. Glad that you are enjoying W&B Platform :slight_smile:
Please see below for your inquiry:

Log Multiple Metrics at Each Time-Step

To log multiple metrics at the same time-step, you should bundle them into the same wandb.log() call. This ensures that all the metrics are synchronized and can be visualized together on the same plot. Here’s an example of how you can log multiple metrics:

# Assuming you have a dictionary of 50 metrics
metrics = {
    "metric1": value1,
    "metric2": value2,
    # ...
    "metric50": value50

# Log all metrics at once

By logging all metrics in a single call, you ensure that they are all associated with the same step and can be plotted together.

You may also check our docs here.

Hi @flavio-martinelli , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!