Open babai3693 opened 4 years ago
model_dir must be the absolute path.
if your model's name is bert-base-german-cased rename like this bert-base-german-cased.index bert-base-german-cased.meta bert-base-german-cased.data-00000-of-00001 bert_config.json vocab.txt
The problem is with TF 2.0. I tested and it work fine on tf 1.15 but not on tf 2.0
env win10 python3.6 bert-serving-client/server 1.9.9 tensorflow 1.13.1 and i got this:
usage: C:\Users\non-admin.conda\envs\textsumm\Scripts\bert-serving-start -model_dir cased_L-12_H-768_A-12/ -num_worker=1 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 = cased_L-12_H-768_A-12/ no_position_embeddings = False no_special_token = False num_worker = 1 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... I:[36mGRAPHOPT[0m:model config: cased_L-12_H-768_A-12/bert_config.json I:[36mGRAPHOPT[0m:checkpoint: cased_L-12_H-768_A-12/bert_model.ckpt E:[36mGRAPHOPT[0m:fail to optimize the graph! Traceback (most recent call last): File "c:\users\non-admin.conda\envs\textsumm\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\non-admin.conda\envs\textsumm\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\non-admin.conda\envs\textsumm\Scripts\bert-serving-start.exe__main.py", line 9, in
File "c:\users\non-admin.conda\envs\textsumm\lib\site-packages\bert_serving\server\cli__init__.py", line 4, in main
with BertServer(get_run_args()) as server:
File "c:\users\non-admin.conda\envs\textsumm\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