facebookresearch / DrQA

Reading Wikipedia to Answer Open-Domain Questions
Other
4.48k stars 896 forks source link

Got this error while training on new dataset #188

Open abcd34576 opened 5 years ago

abcd34576 commented 5 years ago

RuntimeError: Assertion `cur_target >= 0 && cur_target < n_classes' failed. at /opt/conda/conda-bld/pytorch_1535491974311/work/aten/src/THNN/generic/ClassNLLCriterion.c:93

zharenkov commented 5 years ago

Got the same. I created new dataset from MS Marco QA dataset using distant supervision. And when I'm passing these 2 files (train/dev). I've got the same error.

python train.py --embedding-file /storage/glove/glove.840B.300d.txt --data-dir /storage/msmarco/ --train-file marcopairs-train.dstrain --dev-file marcopairs-dev.dstrain --checkpoint True --pretrained /storage/DrQA/data/reader/multitask.mdl --model-name multitask_uptrnd.mdl --official-eval False --dev-json marcopairs-dev.json --tune-partial 1000 --gpu 0

Did you find the reason?

MeiqiGuo commented 5 years ago

I met the same error here. Did you find a solution? Thanks in advance! @abcd34576 @zharenkov

sugarshaw95 commented 4 years ago

metoo

MeiqiGuo commented 4 years ago

@sugarshaw95 I found the error coming from the correct answer span is between negative numbers or reverse numbers, such as [-1,1] or [4,3]. You may check if it is the same case for you.

sugarshaw95 commented 4 years ago

@sugarshaw95 I found the error coming from the correct answer span is between negative numbers or reverse numbers, such as [-1,1] or [4,3]. You may check if it is the same case for you.

Thx for the help,I'm checking on it