Hparams logs not found by tensorboard

I have been logging my metrics to tensorboard as scalars but wanted organise everything better by also logging hparams. However, tensorboard somehow can‘t display the logs.

When I use writer.add_hparams, the hparams card appears in the upper left hand corner in tensorboard and files are being added to the correct logging directory. However, the hparams page always says that no logs could be found, no matter how many logs I write.

Even the most minimal example from the PyTorch documentation will not work:

from torch.utils.tensorboard import SummaryWriter
with SummaryWriter() as w:
    for i in range(5):
        w.add_hparams({'lr': 0.1*i, 'bsize': i},
                      {'hparam/accuracy': 10*i, 'hparam/loss': 10*i})

My tensorboard version is 2.16.2 . Am I doing anything wrong?

I was eventually able to solve it myself by downgrading protobuf via:

pip uninstall protobuf
pip install protobuf==3.20.0
1 Like