Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

use better tensorboard distribution #561

Merged
merged 2 commits into from
Dec 4, 2017

Conversation

DeNeutoy
Copy link
Contributor

@DeNeutoy DeNeutoy commented Dec 1, 2017

This uses a better version of tensorboard which also contains the frontend visualisation stuff, so you don't have to use a different virtualenv to actually look at the logs.

I ran a quick test experiment, everything looks fine:

screen shot 2017-12-01 at 1 36 14 pm

Fixes #342

@schmmd
Copy link
Member

schmmd commented Dec 1, 2017

What's there not to like? These even gets rid of pillow...

@DeNeutoy
Copy link
Contributor Author

DeNeutoy commented Dec 1, 2017

It doesn't actually get rid of pillow in the sense that it still is installed, it just gets installed properly by this version of tensorboard, but I guess it's good that we don't have to explicitly depend on it

@DeNeutoy DeNeutoy requested a review from schmmd December 1, 2017 21:50
@DeNeutoy DeNeutoy merged commit 31a5eb8 into allenai:master Dec 4, 2017
@nelson-liu
Copy link
Contributor

maybe worth noting: After this change, I couldn't get tensorboardX (formerly called tensorboard-pytorch) working while using allennlp as a module. I'd get the following error:

Traceback (most recent call last):
  File "train_model.py", line 13, in <module>
    from tensorboardX import SummaryWriter
  File "/home/nfliu/miniconda3/envs/447/lib/python3.6/site-packages/tensorboardX/__init__.py", line 4, in <module>
    from .writer import FileWriter, SummaryWriter
  File "/home/nfliu/miniconda3/envs/447/lib/python3.6/site-packages/tensorboardX/writer.py", line 24, in <module>
    from .src import event_pb2
  File "/home/nfliu/miniconda3/envs/447/lib/python3.6/site-packages/tensorboardX/src/event_pb2.py", line 16, in <module>
    from tensorboardX.src import summary_pb2 as tensorboardX_dot_src_dot_summary__pb2
  File "/home/nfliu/miniconda3/envs/447/lib/python3.6/site-packages/tensorboardX/src/summary_pb2.py", line 16, in <module>
    from tensorboardX.src import tensor_pb2 as tensorboardX_dot_src_dot_tensor__pb2
  File "/home/nfliu/miniconda3/envs/447/lib/python3.6/site-packages/tensorboardX/src/tensor_pb2.py", line 17, in <module>
    from tensorboardX.src import tensor_shape_pb2 as tensorboardX_dot_src_dot_tensor__shape__pb2
  File "/home/nfliu/miniconda3/envs/447/lib/python3.6/site-packages/tensorboardX/src/tensor_shape_pb2.py", line 22, in <module>
    serialized_pb=_b('\n#tensorboardX/src/tensor_shape.proto\x12\x0btensorboard\"{\n\x10TensorShapeProto\x12.\n\x03\x64im\x18\x02 \x03(\x0b\x32!.tensorboard.TensorShapeProto.Dim\x12\x14\n\x0cunknown_rank\x18\x03 \x01(\x08\x1a!\n\x03\x44im\x12\x0c\n\x04size\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\tB2\n\x18org.tensorflow.frameworkB\x11TensorShapeProtosP\x01\xf8\x01\x01\x62\x06proto3')
  File "/home/nfliu/miniconda3/envs/447/lib/python3.6/site-packages/google/protobuf/descriptor.py", line 829, in __new__
    return _message.default_pool.AddSerializedFile(serialized_pb)
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "tensorboardX/src/tensor_shape.proto":
  tensorboard.TensorShapeProto.dim: "tensorboard.TensorShapeProto.dim" is already defined in file "tensorboard/src/tensor_shape.proto".
  tensorboard.TensorShapeProto.unknown_rank: "tensorboard.TensorShapeProto.unknown_rank" is already defined in file "tensorboard/src/tensor_shape.proto".
  tensorboard.TensorShapeProto.Dim.size: "tensorboard.TensorShapeProto.Dim.size" is already defined in file "tensorboard/src/tensor_shape.proto".
  tensorboard.TensorShapeProto.Dim.name: "tensorboard.TensorShapeProto.Dim.name" is already defined in file "tensorboard/src/tensor_shape.proto".
  tensorboard.TensorShapeProto.Dim: "tensorboard.TensorShapeProto.Dim" is already defined in file "tensorboard/src/tensor_shape.proto".
  tensorboard.TensorShapeProto: "tensorboard.TensorShapeProto" is already defined in file "tensorboard/src/tensor_shape.proto".
  tensorboard.TensorShapeProto.dim: "tensorboard.TensorShapeProto.Dim" seems to be defined in "tensorboard/src/tensor_shape.proto", which is not imported by "tensorboardX/src/tensor_shape.proto".  To use it here, please add the necessary import.

It's an easy enough fix --- just use the tensorboard package from DMLC instead of tensorboardX. Mostly putting this here since it might be helpful to others that get this error as well. Weirdly enough, they can co-exist on my OSX machine but not on my linux box.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants