问题
I am trying to run tensorboard: tensorboard --logdir=runs
.
I have also tried: tensorboard --logdir=runs --host=127.0.0.1
.
I am running the command from the terminal from within the the directory, which contains the runs
folder.
I get the following error:
[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/descriptor.cc:1367]
CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException:
CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
Abort trap: 6
My Python code contains the following lines:
tb_path = './runs/SimpleLSTM_MNIST'
if os.path.isdir(tb_path):
shutil.rmtree(tb_path)
writer = tb.SummaryWriter(log_dir=tb_path)
My runs
folder contains the folder SimpleLSTM_MNIST
, which contains events.out.tfevents.1591953948.computername.local.29440.0
.
Operating System: MacOS Catalina
How can I resolve the problem?
回答1:
looks like protobuf is not working properly, try install latest version
pip3 uninstall protobuf
pip3 install protobuf
回答2:
Apparently this is a specific issue that occurs when running macOS Catalina
, and can be solved by switching to protobuf version 3.8.0
and tensorflow version 2.0.0
.
So basically uninstalling tensorflow
and protobuf
and re-installing with pip3 install protobuf==3.8.0
and pip3 install tensorflow==2.0.0
.
来源:https://stackoverflow.com/questions/62342221/tensorboard-logdir-runs-not-working-abort-trap-6