facebookresearch / DPR

Dense Passage Retriever - is a set of tools and models for open domain Q&A task.
Other
1.73k stars 304 forks source link

Having error while running train_extractive_reader.py #242

Open tkabir1 opened 1 year ago

tkabir1 commented 1 year ago

When I am running python3 train_extractive_reader.py encoder.sequence_length=350 train_files="./prediction_copy.json" dev_files="./prediction.json" gold_passages_src="./gold_passages_info/nq_dev.json" gold_passages_src_dev="./gold_passages_info/nq_dev_dev.json" output_dir="./test_reader/" I am having the error:

input_ids = torch.stack([t for t in positives_selected + negatives_selected], dim=0) RuntimeError: stack expects a non-empty TensorList

Can anyone please help me with that?

gaishun commented 1 year ago

Hi tkabir1 , I have the same problem. By the way, are you using the same train_files and dev_files ? ( Actually, I do this.)