from service.client import BertClient
bc = BertClient(ip='172.18.7.254')
there is no result feedback and long time waiting
172.18.7.254, via e.g. pingI got the similar problem. The problem happened when I use other system accounts on local or tried to use the service remotely. The BertClient could be initialized, but it was stuck when I tried to encode sentences. However, it works well when I use the system account, who has started the bert service. I checked the log, it seems that the service cannot receive any requests of other local users or remotely.
bc = BertClient()
bc.encode(["as"])
- check if you can directly connect to
172.18.7.254, via e.g.ping- check if the ports (default are 5555 and 5556) are opened and you have access to these ports, is your firewall block those ports?
I've tried both , I can connect to 172.18.7.254, and I also tried use these port, neither of them works. then what can I do,please?
- check if you can directly connect to
172.18.7.254, via e.g.ping- check if the ports (default are 5555 and 5556) are opened and you have access to these ports, is your firewall block those ports?
I've tried both , I can connect to
172.18.7.254, and I also tried use these port, neither of them works. then what can I do,please?
can you connect on localhost?
I checked the code and figured out why it couldn't connect in my case. The codes are updated recently and my server was checked out last week, but the client are the newest. The new client is trying to connect port_out (default 5556), and cannot connect to the old server. I think you might also have the inconsistent server and client version, try to update to the newest and it may work well.
yeah, please checkout the latest master
- check if you can directly connect to
172.18.7.254, via e.g.ping- check if the ports (default are 5555 and 5556) are opened and you have access to these ports, is your firewall block those ports?
I've tried both , I can connect to
172.18.7.254, and I also tried use these port, neither of them works. then what can I do,please?can you connect on localhost?
yes, and I've updated the code, there is no response when doing bc.encode(['women'])
I solved a similar problem today.
After checking docker logs CONTAINER, I found the Error:
tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /model/bert_model.ckpt
I:SINK:[ser:run:226]:new job b'a8b5f75c-97ff-4515-b71b-448328b48492#9927e59c-c6d0-4c7c-9166-258f098996ed' size: 2 is registered!
It is because I only put the latest Tensorflow checkpoint of my fine-tuned model in model_dir.
It could be a common mistake. Hope this helps.
Most helpful comment
I checked the code and figured out why it couldn't connect in my case. The codes are updated recently and my server was checked out last week, but the client are the newest. The new client is trying to connect port_out (default 5556), and cannot connect to the old server. I think you might also have the inconsistent server and client version, try to update to the newest and it may work well.