今天在服务器上跑一个之前写的模型,在使用tensorboard时,报错
Exception in thread Reloader:
Traceback (most recent call last):
File "/data0/lmj/anaconda3/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/data0/lmj/anaconda3/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/data0/lmj/anaconda3/lib/python3.7/site-packages/tensorboard/backend/application.py", line 588, in _reload
multiplexer.Reload()
File "/data0/lmj/anaconda3/lib/python3.7/site-packages/tensorboard/backend/event_processing/plugin_event_multiplexer.py", line 255, in Reload
Worker()
File "/data0/lmj/anaconda3/lib/python3.7/site-packages/tensorboard/backend/event_processing/plugin_event_multiplexer.py", line 234, in Worker
accumulator.Reload()
File "/data0/lmj/anaconda3/lib/python3.7/site-packages/tensorboard/backend/event_processing/plugin_event_accumulator.py", line 179, in Reload
for event in self._generator.Load():
File "/data0/lmj/anaconda3/lib/python3.7/site-packages/tensorboard/backend/event_processing/directory_watcher.py", line 90, in Load
for event in self._LoadInternal():
File "/data0/lmj/anaconda3/lib/python3.7/site-packages/tensorboard/backend/event_processing/directory_watcher.py", line 119, in _LoadInternal
for event in self._loader.Load():
File "/data0/lmj/anaconda3/lib/python3.7/site-packages/tensorboard/backend/event_processing/event_file_loader.py", line 155, in Load
yield event_pb2.Event.FromString(record)
google.protobuf.message.DecodeError: Error parsing message
在网上搜索Exception in thread Reloader
看到有的说是关于tensorboard的版本问题,想到自己conda是有两个环境(两个环境中的tensorboard版本不一样),一看模型是在第二个环境中运行的,而终端中打开默认是base,被自己蠢到了,于是conda activate xxx,再使用tensorboard就OK了。
总结
上述报错后检查tensorboard保存时的版本与运行时的版本是否相同(conda环境是否相同)