[Feature]: Plot training and validation losses overlaid on same chart automatically by writing code (not manually in web interface) #7887
Labels
a:sdk
Area: sdk related issues
c:sdk:custom-charts
Component: Custom Charts and define_metric - wandb.plot and rest of vega based custom charts
ty:feature
type of the issue is a feature request
Description
In Tensorboard, when you have separate tensorboard writers, one for train and another for validation, it automatically overlays scalars with the same name on the same chart (see picture attached). This is useful because it makes it easier to spot overfitting. I have tried looking up how to do this using wandb, but it seems you can only manually do this in the web interface. This is cumbersome because I do not want to have to manually click and type multiple times every time I run a new experiment to overlay my train and val losses, and most times there are multiple losses plotted as I plot each subloss that contributes to the overall summed total loss. So if I have 5 sublosses and a total loss, I would have to manually overlay the losses 6 times each time I run an experiment. This is too cumbersome, and this is core functionality that any ML engineer would want.
If there is already a solution to automatically overlay scalars on the same chart by configuring it to do so in the python code, please tell me. But I looked at this open issue that is a year and a half old which asked for this functionality (link: #4449), and the wandb reply was to provide a link to the documentation (https://docs.wandb.ai/guides/app/features/panels/line-plot#compare-two-metrics-on-one-chart) on how to manually use the web interface to overlay two metrics, which is not what was asked for.

Suggested Solution
Possible solutions would be to have the ability to define multiple writers like in tensorboard or to add a group argument to wandb.log() method so we can specify which scalars should be grouped onto the same chart.
Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: