Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list index out of range #36

Open
xuezzz opened this issue Dec 4, 2019 · 2 comments
Open

list index out of range #36

xuezzz opened this issue Dec 4, 2019 · 2 comments

Comments

@xuezzz
Copy link

xuezzz commented Dec 4, 2019

I did it exactly according to readme, but there was a error... Could you tell me how to fix it? Thanks!

`Running eval/trec_eval.9.0.4/trec_eval data/qrels/qrels.mb.txt data/predictions/predict.tmp -m map -m P.20 -m ndcg_cut.20

Traceback (most recent call last):
File "src/main.py", line 92, in
main()

File "src/main.py", line 32, in main
train(args)

File "/home/castil/xueee/birch-master/src/model/train.py", line 53, in train
best_score = eval_select(args, model, tokenizer, validate_dataset, args.model_path, best_score, epoch)

File "/home/castil/xueee/birch-master/src/model/test.py", line 9, in eval_select
scores_dev = test(args, split='dev', model=model, test_dataset=validate_dataset)

File "/home/castil/xueee/birch-master/src/model/test.py", line 87, in test
qrels_file=os.path.join(args.data_path, 'qrels', 'qrels.{}.txt'.format(args.collection)))

File "/home/castil/xueee/birch-master/src/model/eval.py", line 14, in evaluate
map = float(lines[0].strip().split()[-1])

IndexError: list index out of range`

@zeynepakkalyoncu
Copy link
Member

Hi @xuezzz, thanks for your interest in our work! I imagine trec_eval not executing properly is the reason for this error. Could you please print out pout and perr in src/model/eval.py? Could you also share the format of your qrels and predict files with head -5? Thanks!

@xuezzz
Copy link
Author

xuezzz commented Dec 4, 2019

Thanks for your reply quicky! I will try it later.

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

No branches or pull requests

2 participants