Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

RuntimeError: Missing key(s) in state_dict: "encoder.embeddings.position_ids" #228

Open
NehaNishikant opened this issue Aug 17, 2022 · 0 comments

Comments

@NehaNishikant
Copy link

Hi,

I'm trying to get results from the DPR reader, but when I run the following command, I get this error.

command:
python train_extractive_reader.py
prediction_results_file=/home/nnishika/dprout/dpr_reader_on_stqa_decomps.json
eval_top_docs=10
dev_files=/home/nnishika/dprout/dpr_on_stqa_decomps.json
model_file=/home/nnishika/DPR/dpr/downloads/checkpoint/reader/nq-single/hf-bert-base.cp
train.dev_batch_size=80
passages_per_question_predict=100
encoder.sequence_length=350

error:
RuntimeError: Missing key(s) in state_dict: "encoder.embeddings.position_ids"

My model file is a reader checkpoint, so I'm not sure why this is happening. I tried with with this command too using a provided dev file (instead of the one I made) if you want to try reproducing this error.

python3 train_extractive_reader.py
prediction_results_file=junk.out
eval_top_docs=10
dev_files=/home/nnishika/DPR/dpr/downloads/data/retriever_results/nq/single-adv-hn/test.json
model_file=/home/nnishika/DPR/dpr/downloads/checkpoint/reader/nq-single/hf-bert-base.cp
train.dev_batch_size=8
passages_per_question_predict=100
encoder.sequence_length=350

Let me know if you get this error on your end too.

Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant