Log multiple variables at the same plot

Hello there, I would like to log two different variables to show up on the same chart. I use the following:

for I in range(100):
    var1 = something
    var2 = something_else

    wandb.log({"var1":something, "var2":something_else})

but for some reason, the dashboard shows it as two separate plots. I went through the documentation I see this:
Multiple metrics on one chart: Log multiple metrics in the same call to wandb.log, like this:

wandb.log({"acc'": 0.9, "loss": 0.1})

and they will both be available to plot against in the UI.

Can anyone help me on this? I tried many hacks like insertring a list in the place of the variable, or a dict of dicts, etc…


Hey there, you’ll need to edit one of the charts to include the other metrics manually in the UI. I’ll edit the documentation to make this more clear. Here is an example:
May-23-2022 14-53-44