Skip to content

AttributeError: 'NoneType' object has no attribute 'get_logdir' #676

@ranshuo-ICer

Description

@ranshuo-ICer

Describe the bug
When I was using tensorboardX in pytorch to record hyper parameters, I got the error as the title described.

Minimal runnable code to reproduce the behavior

import tensorboardX
writer = tensorboardX.SummaryWriter()
hparams = {'batch_size': args.batch_size,
           'lr': args.lr,
           'momentum': args.momentum,
           'weight_decay': args.weight_decay}
writer.add_hparams(hparams, {'best_acc1': best_acc1})
...

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Environment
What is the result of

protobuf 3.19.6
tensorboard 2.10.1
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
tensorboardX 2.2
torch 1.11.0
torch-tb-profiler 0.4.0
torchaudio 0.11.0
torchvision 0.12.0

Python environment
Which version of python are you using? Did you use Andconda or Virtualenv?
Andconda
Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions