naver / biobert-pretrained

BioBERT: a pre-trained biomedical language representation model for biomedical text mining
667 stars 88 forks source link

Problem with loading model #13

Closed Hedgehogues closed 4 years ago

Hedgehogues commented 4 years ago

Hello. I have a problem with loading model. I think, i break down checksum. I download 1m pubmed dataset, unzip them and after that start next line from the repo:

python run_ner.py --do_train=true --do_eval=true --vocab_file=$BIOBERT_DIR/vocab.txt --bert_config_file=$BIOBERT_DIR/bert_config.json --init_checkpoint=$BIOBERT_DIR/model.ckpt-1000000.data-00000-of-00001 --num_train_epochs=10.0 --data_dir=$NER_DIR/ --output_dir=tmp/bioner/

Next, I have problem:

tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /home/eurvanov/python/biobert/data/biobert_v1.1_pubmed/model.ckpt-1000000.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?

Hedgehogues commented 4 years ago

Run without .data* in the model path

python run_ner.py --do_train=true --do_eval=true --vocab_file=$BIOBERT_DIR/vocab.txt --bert_config_file=$BIOBERT_DIR/bert_config.json --init_checkpoint=$BIOBERT_DIR/model.ckpt-1000000 --num_train_epochs=10.0 --data_dir=$NER_DIR/ --output_dir=tmp/bioner/