question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't see any output from TensorboardLoggerHook

See original GitHub issue

Prerequisite

🐞 Describe the bug

On v3.0.0rc1, I no longer see any output while using TensorboardLoggerHook. I’ve added the following log_config to yolox_s_8xb8-300e_coco.py:

log_config = dict(  # config to register logger hook
    interval=10,  # Interval to print the log
    hooks=[
        dict(type='TextLoggerHook'),
        dict(type='TensorboardLoggerHook', log_dir='/opt/ml/checkpoints', by_epoch=False)
    ]
)

However at the end of training I can’t find any tensorboard logs in the log_dir location.

Environment

Traceback (most recent call last):
  File "mmedit/utils/collect_env.py", line 3, in <module>
    from mmcv.utils import get_git_hash
ImportError: cannot import name 'get_git_hash' from 'mmcv.utils' (/opt/conda/lib/python3.8/site-packages/mmcv/utils/__init__.py)

Python 3.8.13

nvcc: NVIDIA ® Cuda compiler driver Copyright © 2005-2021 NVIDIA Corporation Built on Mon_May__3_19:15:13_PDT_2021 Cuda compilation tools, release 11.3, V11.3.109 Build cuda_11.3.r11.3/compiler.29920130_0

mmcv==2.0.0rc1 mmengine==0.1.0

Additional information

  1. No
  2. Small version of COCO
  3. IIRC, it seemed to work before upgrading to v3.0 and using MMEngine

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
austinmwcommented, Oct 12, 2022

I think this method was deprecated with mmcv 2.x and mmdet 3.x in favor of something like this:

visualizer = dict(
    type='DetLocalVisualizer',
    vis_backends=[
        dict(type='TensorboardVisBackend'),
    ],
    save_dir='/path/to/save',
    name='visualizer'
)

But I haven’t tried it yet myself

0reactions
austinmwcommented, Nov 27, 2022

Using TensorboardVisBackend worked for me to display images in TensorBoard

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logging — PyTorch Lightning 1.8.5.post0 documentation
By default, Lightning uses TensorBoard logger under the hood, and stores the logs to a directory (by default in lightning_logs/ ).
Read more >
Log training metrics for each epoch · Issue #914 · Lightning-AI ...
Currently, I am able to log training metrics to Tensorboard using: import pytorch_lightning as pl from pytorch_lightning.loggers import ...
Read more >
How do you prevent the tensorboard logger in pytorch ...
I was able to disable the hp_metric logging by setting default_hp_metric=False but I can't find anything to disable the logging of the epoch....
Read more >
Using PyTorch Lightning with Tune - the Ray documentation
The class structure of PyTorch Lightning makes it very easy to define and tune model parameters. This tutorial will show you how to...
Read more >
Callbacks — Catalyst 20.10.1 documentation
For example, if you don't want to compute loss on a validation you can ... Stores input/output values during loaders run and computes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found