The wandb.log function does not treat nested dict as it describes in the document


I find that using the wandb.log() does not work like it describe in the document that

Logging nested metrics is encouraged and is supported in the W&B UI. If you log with a nested dictionary like wandb.log({"train": {"acc": 0.9}, "val": {"acc": 0.8}}) , the metrics will be organized into train and val sections in the W&B UI.

Instead, it seems like it will create separate plots with a dot to make different names. In the above sample, it would show me

However, what I expect is the UI should show me two sections (train and val) and separate “acc” named plots inside. BTW, I know if I use wandb.log({"train/acc": 0.9, "val/acc": 0.9}) can achieve this functionality.

Any helps would be appreciated!
Thank you!

Hi Dylan!

Thank you for bringing this up with us! I’ll let our engineering team know there is an issue here. For now, you should also be able to log nested groups as the following:

    'train/acc' : 0.9,
    'val/acc' : 0.8