PacktPublishing / Deep-Reinforcement-Learning-Hands-On

Hands-on Deep Reinforcement Learning, published by Packt
MIT License
2.83k stars 1.28k forks source link

tensorboard first example problem #47

Closed mettinger closed 5 years ago

mettinger commented 5 years ago

On MacOS High Sierra, after installing virtual environment and requirements, obtained this error when trying first tensorboard demo:

(rlenv) ➜ Chapter03 git:(master) ✗ tensorboard --logdir runs --host localhost Traceback (most recent call last): File "/anaconda3/bin/tensorboard", line 6, in from tensorboard.main import run_main File "/anaconda3/lib/python3.6/site-packages/tensorboard/init.py", line 4, in from .writer import FileWriter, SummaryWriter File "/anaconda3/lib/python3.6/site-packages/tensorboard/writer.py", line 28, in from .summary import scalar, histogram, image, audio, text File "/anaconda3/lib/python3.6/site-packages/tensorboard/summary/init.py", line 25, in from tensorboard.summary import v1 File "/anaconda3/lib/python3.6/site-packages/tensorboard/summary/v1.py", line 24, in from tensorboard.plugins.audio import summary as _audio_summary File "/anaconda3/lib/python3.6/site-packages/tensorboard/plugins/audio/summary.py", line 36, in from tensorboard.plugins.audio import metadata File "/anaconda3/lib/python3.6/site-packages/tensorboard/plugins/audio/metadata.py", line 21, in from tensorboard.compat.proto import summary_pb2 File "/anaconda3/lib/python3.6/site-packages/tensorboard/compat/proto/summary_pb2.py", line 15, in from tensorboard.compat.proto import tensor_pb2 as tensorboard_dot_compat_dot_proto_dot_tensor__pb2 File "/anaconda3/lib/python3.6/site-packages/tensorboard/compat/proto/tensor_pb2.py", line 15, in from tensorboard.compat.proto import resource_handle_pb2 as tensorboard_dot_compat_dot_proto_dot_resourcehandlepb2 File "/anaconda3/lib/python3.6/site-packages/tensorboard/compat/proto/resource_handle_pb2.py", line 22, in serialized_pb=_b('\n.tensorboard/compat/proto/resource_handle.proto\x12\x0btensorboard\"r\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tBn\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01Z=github.com/tensorflow/tensorflow/tensorflow/go/core/framework\xf8\x01\x01\x62\x06proto3') File "/anaconda3/lib/python3.6/site-packages/google/protobuf/descriptor.py", line 878, in new return _message.default_pool.AddSerializedFile(serialized_pb) TypeError: Couldn't build proto file into descriptor pool! Invalid proto descriptor for file "tensorboard/compat/proto/resource_handle.proto": tensorboard.ResourceHandleProto.device: "tensorboard.ResourceHandleProto.device" is already defined in file "tensorboard/src/resource_handle.proto". tensorboard.ResourceHandleProto.container: "tensorboard.ResourceHandleProto.container" is already defined in file "tensorboard/src/resource_handle.proto". tensorboard.ResourceHandleProto.name: "tensorboard.ResourceHandleProto.name" is already defined in file "tensorboard/src/resource_handle.proto". tensorboard.ResourceHandleProto.hash_code: "tensorboard.ResourceHandleProto.hash_code" is already defined in file "tensorboard/src/resource_handle.proto". tensorboard.ResourceHandleProto.maybe_type_name: "tensorboard.ResourceHandleProto.maybe_type_name" is already defined in file "tensorboard/src/resource_handle.proto". tensorboard.ResourceHandleProto: "tensorboard.ResourceHandleProto" is already defined in file "tensorboard/src/resource_handle.proto".

Shmuma commented 5 years ago

That's weird. Could you please send the output of pip list command in your environment?

mettinger commented 5 years ago

Package Version


absl-py 0.7.1 astor 0.7.1 atari-py 0.1.6 certifi 2019.3.9 chardet 3.0.4 cycler 0.10.0 future 0.17.1 gast 0.2.2 grpcio 1.20.1 gym 0.10.9 h5py 2.9.0 idna 2.8 Keras-Applications 1.0.7 Keras-Preprocessing 1.0.9 kiwisolver 1.1.0 Markdown 3.1 matplotlib 3.0.2 numpy 1.15.4 opencv-python 3.4.3.18 Pillow 6.0.0 pip 18.1 protobuf 3.7.1 ptan 0.3 pybullet 2.3.6 pyglet 1.3.2 pyparsing 2.4.0 python-dateutil 2.8.0 requests 2.21.0 scipy 1.1.0 setuptools 40.6.2 six 1.12.0 tensorboard 1.12.0 tensorboard-pytorch 0.7.1 tensorflow 1.12.0 termcolor 1.1.0 torch 0.4.1 torchvision 0.2.1 urllib3 1.24.2 Werkzeug 0.15.2 wheel 0.33.1

Shmuma commented 5 years ago

Thanks!

Sorry, cannot reproduce this. Your dependencies looks fine, but tensorboard fails to start due to presence of some protobuf files I don't have in my own installation of this tensorboard. Have you had some later version installed which were downgraded in this environment? If yes, I'd suggest to create a new environment with proper dependencies installed from the beginning.

If it won't help, you can create a separate environment with only tensorflow and tensorboard installed, and use it to start tensorboard service.

mettinger commented 5 years ago

Thanks for helping but it was a silly mistake. I just needed to run tensorboard in the virtual environment rather than the default tensorboard.