jina-ai / clip-as-service

🏄 Scalable embedding, reasoning, ranking for images and sentences with CLIP
https://clip-as-service.jina.ai
Other
12.45k stars 2.07k forks source link

fail to optimize the graph!(start serve failed) #638

Open manhongxiang opened 3 years ago

manhongxiang commented 3 years ago

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:VENTILATOR: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:GRAPHOPT: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`

luminoso commented 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

dogrepairditch commented 2 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

my tensorflow is 1.11.0 but i still can't solve that

bilalghanem commented 2 years ago

I solved it by downloading tensorflow-gpu==1.15.0.