Closed karimmahalian closed 2 years ago
Hi, this is the error from bert-as-service. May I check if you have successfully installed the bert-as-service package? Do you have more details of the error?
Hi,
First thank u for ur quick reply. Yes, the bert-as-service package was installed successfully.
Here are more details about the error
Many thanks in advance!
Hi @karimmahalian , I happen to reproduce your error. I think that's caused by the TensorFlow version issue.
I tried installing tensorflow == 1.13.1
, then running the command you show should work:
Hi
I think I am confused. Do we have to download cased_L-24_H-1024_A-16 here is an error I ve missed
tensorflow.python.framework.errors_impl.NotFoundError: cased_L-24_H-1024_A-16/bert_config.json; No such file or directory
Thanks
Yes, it seems you have to
wget https://storage.googleapis.com/bert_models/2018_10_18/cased_L-24_H-1024_A-16.zip
I downloaded from the google BERT repo (https://github.com/google-research/bert#pre-trained-models)
Yesss, it works now. However, it tooks a lot of time to be executed. I ve changed Bert large by Bert basic but still the same issue. Could u plz tell me how to run it on GPU instead of CPU?
I really appreciate the time u offer to help run the code. Thank u!
I'm not the main maintainer, but looking at the document in the "bert-as-service" (https://github.com/llSourcell/bert-as-service)
It seems the default is GPU?
May be you can try specify the device_map=[0]
Oh, I saw your command here:
bert-serving-start -pooling_layer -7 -model_dir cased_L-24_H-1024_A-16 -max_seq_len=NONE -cased_tokenization -num_worker=8 -port=8888 -pooling_strategy=NONE -cpu -show_tokens_to_client
You explicitly specify cpu
, please remove that argument and it will run on GPU.
Yes, u re right I didn t pay attention to it. Thank u
Hi,
Thank u for sharing ur code with us. I tried to run this command
bert-serving-start -pooling_layer -7 -model_dir cased_L-24_H-1024_A-16 -max_seq_len=NONE -cased_tokenization -num_worker=8 -port=8888 -pooling_strategy=NONE -cpu -show_tokens_to_client
but I got this error
self.graph_path, self.bert_config = pool.apply(optimize_graph, (self.args,)) TypeError: cannot unpack non-iterable NoneType object
Any ideas plz? thank u