Open HeziLiu opened 4 years ago
I have the same question!Have you solved it?
Facing the same issue when I tried to start the server, here is the stacktrace - looks like issue related to tensorflow 2.0 updates. Please let us know if this will be addressed soon.
I:VENTILATOR:[i:i: 67]:freeze, optimize and export graph, could take a while...
E:GRAPHOPT:[gra:opt:151]:fail to optimize the graph!
Traceback (most recent call last):
File "skc/environments/.virtualenvs/bert/lib/python3.6/site-packages/bert_serving/server/graph.py", line 41, in optimize_graph
tf = import_tf(verbose=args.verbose)
File "/environments/.virtualenvs/bert/lib/python3.6/site-packages/bert_serving/server/helper.py", line 186, in import_tf
tf.logging.set_verbosity(tf.logging.DEBUG if verbose else tf.logging.ERROR)
AttributeError: module 'tensorflow' has no attribute 'logging'
Traceback (most recent call last):
File "/environments/.virtualenvs/bert/bin/bert-serving-start", line 8, in
sorry - downgrading to tensorflow 1.x worked, it was due to 2.0 updates. I tried to upgrade the bert_serving scripts using 2.0 tools, but I wasn't successful as there were some errors.
I have the same question!Have you solved it?
I change to another env with
tensorflow 1.13.1
bert-serving-client/server 1.9.9
python3.7
and it works well😀
sorry - downgrading to tensorflow 1.x worked, it was due to 2.0 updates. I tried to upgrade the bert_serving scripts using 2.0 tools, but I wasn't successful as there were some errors.
but with my env with tensorflow 1.14.0 it seems doesn't work....
downgrading to tensorflow version 1.15 seems to work for me
check the path of the downloaded model.
I have the same question!Have you solved it?
I change to another env with tensorflow 1.13.1 bert-serving-client/server 1.9.9 python3.7 and it works well😀
thank you so much , finally it work for me !
I meet that issue to..but I don't want to downgrading,Is there have any other settlement work for 2.0
I am still facing the above issue have tried couple of solutions. Version - tensorflow-cpu = 1.13.1 Bert_serving_client = 1.9.9 Bert_serving_server = 1.9.9
I am running the below command after locating at model_dir command bert-serving-start -model_dir uncased_L-2_H-128_A-2\ -cpu files present in model_dir :bert_config.json,bert_model.ckpt.data-00000-of-00001,bert_model.ckpt.index,vocab.txt have tried with providing absolute path till model directory too system config - 12 gb ram. let me know how could I resolve this.Thanks in advance
I am getting the same problem in windows, although I tried all the methods. "TypeError: 'NoneType' object is not iterable". Please somebody help me.
你们模型目录写错啦
你们模型目录写错啦 那应该怎么写呢,没有发现哪里写错了
你们模型目录写错啦 那应该怎么写呢,没有发现哪里写错了
你试试绝对路径
你们模型目录写错啦 那应该怎么写呢,没有发现哪里写错了
你试试绝对路径
还是不行的,我的绝对路径还是不行,不过还是谢谢你啦
加速 入关
你们模型目录写错啦 那应该怎么写呢,没有发现哪里写错了
你试试绝对路径
还是不行的,我的绝对路径还是不行,不过还是谢谢你啦
有可能是tensorflow版本过高,api不兼容,只支持1.x.x版本的。报错信息跟进去,可以看到源码,大于1的版本会报一个未测试验证的警告。
你们模型目录写错啦 那应该怎么写呢,没有发现哪里写错了
你最后怎么弄的呀 我要崩溃了
您好,我已经收到您的邮件,我将尽快处理。 --胡思可
env win10 python3.6 bert-serving-client/server 1.9.7 tensorflow 1.14.0 and i got this: E:\Software\Python3.6.5\Scripts>bert-serving-start -model_dir ./uncased_L-12_H-768_A-12/ -num_worker=4 usage: E:\Software\Python3.6.5\Scripts\bert-serving-start -model_dir ./uncased_L-12_H-768_A-12/ -num_worker=4 ARG VALUE
fixed_embed_length = False fp16 = False gpu_memory_fraction = 0.5 graph_tmp_dir = None http_max_connect = 10 http_port = None mask_cls_sep = False max_batch_size = 256 max_seq_len = 25 model_dir = ./uncased_L-12_H-768_A-12/ no_special_token = False num_worker = 4 pooling_layer = [-2] pooling_strategy = REDUCE_MEAN port = 5555 port_out = 5556 prefetch_size = 10 priority_batch_size = 16 show_tokens_to_client = False tuned_model_dir = None verbose = False xla = False
I:[35mVENTILATOR[0m:freeze, optimize and export graph, could take a while... WARNING:tensorflow:From e:\software\python3.6.5\lib\site-packages\bert_serving\server\helper.py:184: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.
WARNING:tensorflow:From e:\software\python3.6.5\lib\site-packages\bert_serving\server\helper.py:184: The name tf.logging.ERROR is deprecated. Please use tf.compat.v1.logging.ERROR instead.
I:[36mGRAPHOPT[0m:model config: ./uncased_L-12_H-768_A-12/bert_config.json I:[36mGRAPHOPT[0m:checkpoint: ./uncased_L-12_H-768_A-12/bert_model.ckpt I:[36mGRAPHOPT[0m:build graph... E:[36mGRAPHOPT[0m:fail to optimize the graph! Traceback (most recent call last): File "e:\software\python3.6.5\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "e:\software\python3.6.5\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "E:\Software\Python3.6.5\Scripts\bert-serving-start.exe__main.py", line 9, in
File "e:\software\python3.6.5\lib\site-packages\bert_serving\server\cli__init__.py", line 4, in main
with BertServer(get_run_args()) as server:
**File "e:\software\python3.6.5\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**