tensorboard: Tensorboard metrics not loaded properly
I have the problem that in Tensorboard the metrics are not loaded correctly (the column is always empty), although the scalars are saved correctly. I am working with torch.utils.tensorboard.
Relevant code:
writer = SummaryWriter(log_dir=f'./logs/studies/{study_name}/')
In the training loop:
writer.add_scalar(tag='validation/min_loss', scalar_value=min_val_loss, global_step=trial.number)
Add the hyperparameter to the summary writer (args_dict is a dictionary with all hyperparameters)
writer.add_hparams(hparam_dict=args_dict, metric_dict={'validation/min_loss': min_val_loss}, run_name=run_name)
writer.close()
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 17 (5 by maintainers)
I am also experiencing this same issue. My environment is python 3.12 through miniconda on Windows 10 Pro 19045, with Tensorboard 2.19.0. Note that I do not have any issue when running Tensorboard from Debian 12, also with Tensorboard with 2.19.0. Even more surprising, mounting my windows directory into WSL Ubuntu 22 and running tensorboard from there also works.
At least in my case, this therefore seems to be a windows specific issue.
This seems to be an issue with purely visualization, not logging, because I can log the data with Windows python and visualize without issue through WSL when mounting the Windows-generated tensorboard logs. This behavior was tested with both tensorflow logging and pytorch torch.utils.tensorboard logging.
@timr1101 @lebeand @kevinunger @dlindmark @0523ronli @XuRainbow Can you confirm if you were using Windows when encountering the issue?
I’m also having the same issue with
tensorboard==2.18.0andtensorboard-data-server==0.7.2.I still experience this on TB 2.19.0 I write my data like this.
using torch==2.8.0 and TB==2.19.0 i do not get any values in my episode_return_mean column in the hparams tab of tensorboard. Downgrading TB to 2.16.2 fixes it. But then I must downgrade protobuf aswell. Which I cannot do due to other dependencies.
I have the same issue in tensorboard==2.19.0 Is anyone working on the fix?
Hey James, the tensorboard versions were indeed the deciding factor. I had the newer versions
installed. Downgrading to
solved the problem and all metrics were displayed correctly. Thank you very much for your help! One more note: I also installed the today released version
and
However, the problem still exists for these.
Hey Tim, thanks for sending me your logs. Unfortunately, I still cannot reproduce the issue. I ran these commands:
What version of TensorBoard are you running?
Sure. But since I’m currently on vacation, I can’t do this until the beginning of next week.