Open Constant-TL opened 5 years ago
这个问题之前在另一台Linux mint系统的服务器也出现过,不过后来不知道由于什么原因突然就可以运行了,但在windows上这个问题一直没有解决
The same problem met in Windows10, did anyone know the result? I tried version of tensorflow-gpu 1.12 and 1.10 , 1.9.1 version of bert-server
The problem done by reducing the version to 1.8
The problem done by reducing the version to 1.8
Is the bert-as-server reduced to version 1.8? Can you send me your resolution process? @Jeffyangchina Thanks for you help.
pip install -U bert-serving-server==1.8
After reducing the version to 1.8, another problem appeared:
I:?[35mVENTILATOR?[0m:freeze, optimize and export graph, could take a while...
I:?[36mGRAPHOPT?[0m:model config: F:\DL\Constant-TL\BERT\chinese_L-12_H-768_A-12\bert_config.json
I:?[36mGRAPHOPT?[0m:checkpoint: F:\DL\Constant-TL\BERT\chinese_L-12_H-768_A-12\bert_model.ckpt
E:?[36mGRAPHOPT?[0m:fail to optimize the graph!
Traceback (most recent call last):
File "d:\dl\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\dl\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\DL\anaconda3\Scripts\bert-serving-start.exe\__main__.py", line 9, in <module>
File "d:\dl\anaconda3\lib\site-packages\bert_serving\server\cli\__init__.py", line 5, in main
server = BertServer(args)
File "d:\dl\anaconda3\lib\site-packages\bert_serving\server\__init__.py", line 76, in __init__
raise FileNotFoundError('graph optimization fails and returns empty result')
FileNotFoundError: graph optimization fails and returns empty result
在lib\bert_serving\server\graph.py 中引入 import traceback方法, 在150行(except Exception :后面)插入语句traceback.print_exc()。重新运行,打印出配置失败的原因是目录没对。重新检查目录后成功。所以,正确方法是打印出真正的错误原因。
bert-serving-server目前还不支持tensorflow2.0? TensorFlow version: 2.0.0b1 Python version: 3.7.3 bert-serving-server version: 1.8.0 bert-serving-client version: 1.9.6
bert-serving-start -model_dir=E:/code/NLP/chinese_L-12_H-768_A-12 -num_worker=2
Traceback (most recent call last):
File "g:\python\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec)
File "g:\python\lib\runpy.py", line 85, in _run_code exec(code, run_globals)
File "G:\Python\Scripts\bert-serving-start.exe__main__.py", line 5, in
Prerequisites
bert-as-service
?README.md
?README.md
?System information
bert-as-service
version: 1.9.1Description
I'm using this command to start the server:
Then this issue shows up: