PoisonedRAG icon indicating copy to clipboard operation
PoisonedRAG copied to clipboard

args.orig_beir_results is None when evaluating msmarco

Open ybdai7 opened this issue 7 months ago • 0 comments

Hi,

When i was evaluating msmarcos using default settings, I encountered the following error in main.py. When args.eval_dataset == 'msmarco', args.split = 'train' in L57, the following codes do not set the value for args.orig_beir_results, resulting in an error.

if args.orig_beir_results is None: 
        print(f"Please evaluate on BEIR first -- {args.eval_model_code} on {args.eval_dataset}")
        # Try to get beir eval results from ./beir_results
        print("Now try to get beir eval results from results/beir_results/...")
        if args.split == 'test':
            args.orig_beir_results = f"results/beir_results/{args.eval_dataset}-{args.eval_model_code}.json"
        elif args.split == 'dev':
            args.orig_beir_results = f"results/beir_results/{args.eval_dataset}-{args.eval_model_code}-dev.json"
        if args.score_function == 'cos_sim':
            args.orig_beir_results = f"results/beir_results/{args.eval_dataset}-{args.eval_model_code}-cos.json"
        assert os.path.exists(args.orig_beir_results), f"Failed to get beir_results from {args.orig_beir_results}!"
        print(f"Automatically get beir_resutls from {args.orig_beir_results}.")

Should I change if args.split == 'test': into if args.split == 'test' or (args.eval_dataset == 'msmarco' and args.split == 'train'):

ybdai7 avatar Jun 24 '25 15:06 ybdai7