jina-ai / clip-as-service

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

bert as service ready to listening #398

Open wangru158105 opened 5 years ago

wangru158105 commented 5 years ago

Prerequisites

Please fill in by replacing [ ] with [x].

System information

Some of this information can be collected via this script.


Description

I'm using this command to start the server: /usr/local/python3/bin/bert-serving-start -model_dir /raid5/rwang/practice/Bert/uncased_L-12_H-768_A-12 -num_worker=2

Then this issue shows up: usage: /usr/local/python3/bin/bert-serving-start -model_dir /raid5/rwang/practice/Bert/uncased_L-12_H-768_A-12 -num_worker=2 ARG VALUE


       ckpt_name = bert_model.ckpt
     config_name = bert_config.json
            cors = *
             cpu = False
      device_map = []
   do_lower_case = True

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 = /raid5/rwang/practice/Bert/uncased_L-12_H-768_A-12 num_worker = 2 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:VENTILATOR:[i:i: 66]:freeze, optimize and export graph, could take a while... WARNING: Logging before flag parsing goes to stderr. I0702 09:38:48.417041 140424210736960 init.py:66] freeze, optimize and export graph, could take a while... I:GRAPHOPT:[gra:opt: 52]:model config: /raid5/rwang/practice/Bert/uncased_L-12_H-768_A-12/bert_config.json I0702 09:38:48.424616 140424210736960 graph.py:52] model config: /raid5/rwang/practice/Bert/uncased_L-12_H-768_A-12/bert_config.json I:GRAPHOPT:[gra:opt: 55]:checkpoint: /raid5/rwang/practice/Bert/uncased_L-12_H-768_A-12/bert_model.ckpt I0702 09:38:48.424874 140424210736960 graph.py:55] checkpoint: /raid5/rwang/practice/Bert/uncased_L-12_H-768_A-12/bert_model.ckpt I:GRAPHOPT:[gra:opt: 59]:build graph... I0702 09:38:48.425570 140424210736960 graph.py:59] build graph... I:GRAPHOPT:[gra:opt:128]:load parameters from checkpoint... I0702 09:38:51.368392 140424210736960 graph.py:128] load parameters from checkpoint... I:GRAPHOPT:[gra:opt:132]:optimize... I0702 09:38:51.877591 140424210736960 graph.py:132] optimize... I:GRAPHOPT:[gra:opt:140]:freeze... I0702 09:38:52.128655 140424210736960 graph.py:140] freeze... I:GRAPHOPT:[gra:opt:145]:write graph to a tmp file: /tmp/tmpz0su7ewc I0702 09:38:52.619098 140424210736960 graph.py:145] write graph to a tmp file: /tmp/tmpz0su7ewc I:VENTILATOR:[i:i: 74]:optimized graph is stored at: /tmp/tmpz0su7ewc I0702 09:38:53.644275 140424210736960 init.py:74] optimized graph is stored at: /tmp/tmpz0su7ewc I:VENTILATOR:[i:_ru:128]:bind all sockets I0702 09:38:53.645397 140422115501824 init.py:128] bind all sockets I:VENTILATOR:[__i:_ru:132]:open 8 ventilator-worker sockets I0702 09:38:53.646291 140422115501824 init.py:132] open 8 ventilator-worker sockets I:VENTILATOR:[i:_ru:135]:start the sink I0702 09:38:53.646425 140422115501824 init.py:135] start the sink I:SINK:[i:_ru:305]:ready I:VENTILATOR:[__i:_ge:221]:get devices I0702 09:38:53.652413 140422115501824 init.py:305] ready I0702 09:38:53.652367 140422115501824 init.py:221] get devices I:VENTILATOR:[i:_ge:254]:device map: worker 0 -> gpu 1 worker 1 -> gpu 2 I0702 09:38:53.769331 140422115501824 init.py:254] device map: worker 0 -> gpu 1 worker 1 -> gpu 2 I:WORKER-0:[i:_ru:529]:use device gpu: 1, load graph from /tmp/tmpz0su7ewc I0702 09:38:53.774237 140422115501824 init.py:529] use device gpu: 1, load graph from /tmp/tmpz0su7ewc I:WORKER-1:[__i:_ru:529]:use device gpu: 2, load graph from /tmp/tmpz0su7ewc I0702 09:38:53.777859 140422115501824 init.py:529] use device gpu: 2, load graph from /tmp/tmpz0su7ewc I:WORKER-1:[i:gen:557]:ready and listening! I0702 09:38:57.191748 140417890764544 init.py:557] ready and listening! I:WORKER-0:[i:gen:557]:ready and listening! I0702 09:38:57.192485 140417890764544 init.py:557] ready and listening! I:VENTILATOR:[i:_ru:163]:all set, ready to serve request! I0702 09:38:57.192897 140422115501824 init.py:163] all set, ready to serve request!

it stopped here and didn't respond to any code typing. why?

...

ishita-gupta98 commented 5 years ago

I am facing the exact same issue right now, any idea what the problem is ?

bipedalBit commented 5 years ago

Even if open another terminal and run a python script including following code?

from bert_serving.client import BertClient
bc = BertClient()
res = bc.encode(['Hello world!'])
print(res)
wangru158105 commented 5 years ago

Even if open another terminal and run a python script including following code?

from bert_serving.client import BertClient
bc = BertClient()
res = bc.encode(['Hello world!'])
print(res)

When it runs "bc=BertClient()",it stops here.....

bipedalBit commented 5 years ago

Even if open another terminal and run a python script including following code?

from bert_serving.client import BertClient
bc = BertClient()
res = bc.encode(['Hello world!'])
print(res)

When it runs "bc=BertClient()",it stops here.....

I've met this situation. You may check your RAM/GPU memory occupancy when the program stuck.

ykkim082 commented 4 years ago

Hello, I have the same issue. Can you tell me how you resolved this issue?

Magiclemond commented 4 years ago

I have the same issue but no one can solve this problem

lhz211 commented 3 years ago

I have the same issue ,too.can someone solve this problem?