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.

Cannot import SummaryWriter

See original GitHub issue

When I try to do:

from tensorboard import SummaryWriter I get an error saying ImportError: cannot import name 'SummaryWriter' After looking inside conda packages I found out that in the folder ~/anaconda3/lib/python3.6/site-packages/tensorboard/ there is no SummaryWriter, instead, I found it in the folder [...]/tensorboardX. Thus, I changed to from tensorboardX import SummaryWriter getting a new error when logging a scalar value that says TypeError: Parameter to MergeFrom() must be instance of same class: expected Summary got Summary. for field Event.summary

Any ideas of why is this happening?

Thanks in advance, Manu.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
mlagunascommented, Aug 25, 2017

Seems to be working after uninstalling tensorboard-pytorch and installing tensorboardX. I will do further testing later and comment you the results.

Thanks!

2reactions
mlagunascommented, Aug 25, 2017

Tested in depth, every functions seems to work perfect! (even adding a graph! 👍 )

Thanks, this can be closed!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name 'SummaryWriter' #19
I tried, from tensorboard import SummaryWriter , it complains as the title. However, I find the SummaryWriter is in the writer.py in tensorboard ......
Read more >
ImportError: cannot import name 'SummaryWriter'
Can anyone help me on this error, I am trying to use allennlp models and getting the below error. from allennlp.training.metrics import Average, ......
Read more >
cannot import name 'SummaryWriter' from 'tensorboard ...
I've tried importing as rom torch.utils.tensorboard import SummaryWriter and also I tried this: from tensorboardX import SummaryWriter .
Read more >
ImportError: cannot import name 'SummaryWriter' from ...
ImportError: cannot import name 'SummaryWriter' from partially initialized module 'torch.utils.tensorboard' (most likely due to a circular ...
Read more >
Tutorials - tensorboardX documentation - Read the Docs
from tensorboardX import SummaryWriter #SummaryWriter encapsulates everything writer = SummaryWriter('runs/exp-1') #creates writer object.
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