运行时,错误提示如下:
E:?[36mGRAPHOPT?[0m:fail to optimize the graph!
....
File "/home/bonky/anaconda3/lib/site-packages/bert_serving/server/__init__.py", line 70, in __init__
self.graph_path, self.bert_config = pool.apply(optimize_graph, (self.args,))
TypeError: cannot unpack non-iterable NoneType object
直接降级 bert-serving-server
到 1.8
版本即可运行
pip install -U bert-serving-server==1.8