首页 > 解决方案 > tensorboard --logdir=runs not working:中止陷阱:6

问题描述

我正在尝试运行 tensorboard: tensorboard --logdir=runs
我也试过:tensorboard --logdir=runs --host=127.0.0.1
我正在从包含runs文件夹的目录中的终端运行命令。

我收到以下错误:

[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

我的 Python 代码包含以下几行:

tb_path = './runs/SimpleLSTM_MNIST'
if os.path.isdir(tb_path):
    shutil.rmtree(tb_path)

writer = tb.SummaryWriter(log_dir=tb_path)

runs的文件夹包含文件夹SimpleLSTM_MNIST,其中包含events.out.tfevents.1591953948.computername.local.29440.0.

操作系统:MacOS Catalina

我该如何解决这个问题?

标签: pythonpytorchtensorboardabort

解决方案


看起来 protobuf 无法正常工作,请尝试安装最新版本

pip3 uninstall protobuf
pip3 install protobuf

推荐阅读