Tensorboardx: Error using `add_hparams`

Created on 27 Aug 2019  路  8Comments  路  Source: lanpa/tensorboardX

AttributeError: 'EnumTypeWrapper' object has no attribute 'STATUS_SUCCESS'
Attempted to use add_hparams when compiled from source. TensorboardX version 1.8+9b9933a

Minimal runnable code to reproduce the behavior

from tensorboardX import SummaryWriter
writer = SummaryWriter()
writer.add_hparams({'lr': 1e-5, 'bsize': 20, 'n_hidden': 100}, {'accuracy': 0, 'loss': 0})
...

Expected behavior
I followed the example file here

Screenshots
If applicable, add screenshots to help explain your problem.
image

Environment
What is the result of
pip list|grep -E "torch|proto|tensor"
image

Python environment
Which version of python are you using? Did you use Andconda or Virtualenv? No

Most helpful comment

I solved this issue (occuring in PyCharm as well as terminal) by updating to protobuf 3.9.1 (which will not help @RSKothari but might help @tmac1997 )

All 8 comments

It seems this issue is only present using Spyder. Strangely, when I run this code using my terminal, it works just fine. Doesn't seem like a tensorboardX issue. Will update if I get more information.

@RSKothari hi, did you make any progress on this issue? I encountered same problem in jupyter notebook. Don't know if it works in terminal.

Hi @tmac1997 , sorry I gave up on trying to use hparams. I haven't visualized its output either. Will be sure to post any updates.

I solved this issue (occuring in PyCharm as well as terminal) by updating to protobuf 3.9.1 (which will not help @RSKothari but might help @tmac1997 )

@clefourrier Thanks! This really helps solve my problem. I'm wondering how did find the solution?

@tmac1997 I followed the code execution step by step, and did not notice anything unusual. Then, I saw here that RSKothari does not have this problem when using the terminal, which means that it can work with his environment. Since his version of protobuf was not the same as mine, I updated, and it fixed my problem.

Thank you for sorting the problem out! @RSKothari @clefourrier

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aymenmir94 picture aymenmir94  路  7Comments

JsBlueCat picture JsBlueCat  路  3Comments

chinmay5 picture chinmay5  路  5Comments

jtang10 picture jtang10  路  4Comments

hrtang picture hrtang  路  4Comments