clip-as-service
clip-as-service copied to clipboard
How to use bert-as-service with BioBERT?
Prerequisites
Please fill in by replacing
[ ]
with[x]
.
- [X ] Are you running the latest
bert-as-service
? - [X ] Did you follow the installation and the usage instructions in
README.md
? - [X ] Did you check the FAQ list in
README.md
? - [X ] Did you perform a cursory search on existing issues?
System information
Some of this information can be collected via this script.
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
- TensorFlow installed from (source or binary): binary
- TensorFlow version: 1.13.1
- Python version: 3.7.3
-
bert-as-service
version: 1.8.9 - GPU model and memory: NVIDIA GeForce GTX 1050 -- 4GB
- CPU model and memory: Intel Core i7-7700HQ CPU @ 2.80GHz --16GB
Description
I downloaded from here https://github.com/naver/biobert-pretrained the BioBERT pre-trained weights, then I tried to load them in bert-as-service but I have problems.
I'm using this command to start the server:
bert-serving-start -model_dir=C:\ML\BERT\uncased_L-24_H-1024_A-16 -tuned_model_dir=C:\ML\BERT\BioBERT\pubmed_pmc_470k -ckpt_name=biobert_model.ckpt -max_seq_len=NONE
Then this issue shows up:
Traceback (most recent call last):
File "c:\program files\python37\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\program files\python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Program Files\Python37\Scripts\bert-serving-start.exe_main.py", line 9, in
the same problem: File "c:\programdata\anaconda3\lib\site-packages\bert_serving\server_init_.py", line 70, in init self.graph_path, self.bert_config = pool.apply(optimize_graph, (self.args,)) TypeError: cannot unpack non-iterable NoneType object。
possible reason:the model file has been damaged the solution is:downlaod the model from the readme, change the model file
@alexferrari88 same problem.. did you find any solution ?
Facing same issue as @alexferrari88
I specified the -model_dir as the directory that contained the bioBert files and also renamed them made sure the model name and config.json matched the -ckpt_name and -config_name flags. The default of -ckpt_name is 'bert_model.ckpt" and the default of config_name is "bert_config.json"
I specified the -model_dir as the directory that contained the bioBert files and also renamed them made sure the model name and config.json matched the -ckpt_name and -config_name flags. The default of -ckpt_name is 'bert_model.ckpt" and the default of config_name is "bert_config.json"
And did that get it working for you?
@bevankoopman Yes it did. I recommend using the HuggingFace transformers library to use Bert. It is more up to date with the current releases.