Open manhongxiang opened 3 years ago
I was having the same problem. You need tensorflow 1
This is how I manage to run it:
$ conda create -n bert-as-service python=3.7
$ conda activate bert-as-service
$ pip install tensorflow==1.15.5
$ pip install bert-serving-server
and then just run bert-serving-start
I was having the same problem. You need tensorflow 1
This is how I manage to run it:
$ conda create -n bert-as-service python=3.7 $ conda activate bert-as-service $ pip install tensorflow==1.15.5 $ pip install bert-serving-server
and then just run
bert-serving-start
my tensorflow is 1.11.0 but i still can't solve that
I solved it by downloading tensorflow-gpu==1.15.0
.
I start server using command:
bert-serving-start -model_dir C:\****\****\chinese_roberta_wwm_large_ext_L-24_H-1024_A-16
and start failed. `I:[35mVENTILATOR[0m:freeze, optimize and export graph, could take a while... c:\users***\appdata\local\programs\python\python36\lib\site-packages\bert_serving\server\helper.py:176: UserWarning: Tensorflow 2.0.0 is not tested! It may or may not work. Feel free to submit an issue at https://github.com/hanxiao/bert-as-service/issues/ 'Feel free to submit an issue at https://github.com/hanxiao/bert-as-service/issues/' % tf.version) E:[36mGRAPHOPT[0m:fail to optimize the graph!Traceback (most recent call last): File "c:\users*\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users*\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users*\AppData\Local\Programs\Python\Python36\Scripts\bert-serving-start.exe__main__.py", line 7, in
File "c:\users* \appdata\local\programs\python\python36\lib\site-packages\bert_serving\server\cli__init__.py", line 4, in main
with BertServer(get_run_args()) as server:
File "c:\users*****\appdata\local\programs\python\python36\lib\site-packages\bert_serving\server__init.py", line 71, in init__
self.graph_path, self.bert_config = pool.apply(optimize_graph, (self.args,))
TypeError: 'NoneType' object is not iterable`