Skip to content

list index out of range #36

@xuezzz

Description

@xuezzz

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`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions