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

Questions about the path of the dev files #199

Closed unw9527 closed 3 years ago

unw9527 commented 3 years ago

Hi, thanks for your great work.

I found that when I want to do inference with the reader, using the command lines suggested will cause an error:

[140587439101760] 2021-11-14 02:41:32,118 [INFO] root: Sys.argv: ['train_extractive_reader.py', 'prediction_results_file=/scratch/xxx/DPR/reader_results/result', 'eval_top_docs=[10,20]', 'dev_files=', '/scratch/xxx/DPR/retriever_results/sem_retri_test_result.json', 'model_file=/scratch/xxx/DPR/reader_results/dpr_extractive_reader.101.21', 'train.dev_batch_size=80', 'passages_per_question_predict=20', 'encoder.sequence_length=100']
[140587439101760] 2021-11-14 02:41:32,119 [INFO] root: Hydra formatted Sys.argv: ['train_extractive_reader.py', 'prediction_results_file=/scratch/xxx/DPR/reader_results/result', 'eval_top_docs=[10,20]', 'dev_files=', '/scratch/xxx/DPR/retriever_results/sem_retri_test_result.json', 'model_file=/scratch/xxx/DPR/reader_results/dpr_extractive_reader.101.21', 'train.dev_batch_size=80', 'passages_per_question_predict=20', 'encoder.sequence_length=100']
Error parsing override '/scratch/xxx/DPR/retriever_results/sem_retri_test_result.json'
extraneous input '/' expecting {EQUAL, '~', '+', '@', KEY_SPECIAL, DOT_PATH, ID}
See https://hydra.cc/docs/next/advanced/override_grammar/basic for details

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

The command I use is:

python train_extractive_reader.py \

prediction_results_file=/scratch/xxx/DPR/reader_results/result eval_top_docs=[10,20]  \

dev_files= /scratch/xxx/DPR/retriever_results/sem_retri_test_result.json \

model_file=/scratch/xxx/DPR/reader_results/dpr_extractive_reader.101.21 train.dev_batch_size=80 \

passages_per_question_predict=20 encoder.sequence_length=100

Any ideas on why this happens?

vlad-karpukhin commented 3 years ago

Hi @unw9527 , You should remove the space between dev_files= and its value in your cli line.

unw9527 commented 3 years ago

Thank you for your reply. I accidentally hit an extra space😂