diff --git a/src/main/python/fine_tuning/reconstruct_robus04_tuned_run.py b/src/main/python/fine_tuning/reconstruct_robus04_tuned_run.py index 8b5416ac8..d963d0233 100644 --- a/src/main/python/fine_tuning/reconstruct_robus04_tuned_run.py +++ b/src/main/python/fine_tuning/reconstruct_robus04_tuned_run.py @@ -69,19 +69,17 @@ out.close() # Generate run for each fold using tuned parameters. + folds_run_files = [] for i in range(len(folds)): - #print(f'target/appassembler/bin/SearchCollection -topicreader Trec -index {index} ' - # f'-topics topics.robust04.fold{i} -output {args.output}.fold{i} -hits 1000 {params[i]}') os.system(f'target/appassembler/bin/SearchCollection -topicreader Trec -index {index} ' f'-topics topics.robust04.fold{i} -output {args.output}.fold{i} -hits 1000 {params[i]}') + folds_run_files.append(f'{args.output}.fold{i}') # Concatenate all partial run files together. print('Concatenating the following files:') with open(args.output, 'w') as outfile: - for fname in glob.glob(f'{args.output}.fold*'): + for fname in folds_run_files: print(f' - {fname}') - #if fname.for fname in folds_run_files: with open(fname) as infile: outfile.write(infile.read()) - print(f'Done! Finished writing {args.output}') - + print(f'Finished writing {args.output}') diff --git a/src/main/resources/fine_tuning/params/params.map.robust04-paper1-folds.bm25+ax.json b/src/main/resources/fine_tuning/params/params.map.robust04-paper1-folds.bm25+ax.json index ac92ee89f..a486ff593 100644 --- a/src/main/resources/fine_tuning/params/params.map.robust04-paper1-folds.bm25+ax.json +++ b/src/main/resources/fine_tuning/params/params.map.robust04-paper1-folds.bm25+ax.json @@ -1,2 +1,2 @@ -[ "-bm25 -axiom -bm25.k1 0.8 -bm25.b 0.55 -rerankCutoff 50 -axiom.deterministic -axiom.n 30 -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.35 -axiom.top 50", - "-bm25 -axiom -bm25.k1 0.8 -bm25.b 0.50 -rerankCutoff 50 -axiom.deterministic -axiom.n 30 -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 25" ] +[ "-bm25 -axiom -bm25.k1 0.8 -bm25.b 0.55 -rerankCutoff 50 -axiom.deterministic -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.35 -axiom.top 50", + "-bm25 -axiom -bm25.k1 0.8 -bm25.b 0.50 -rerankCutoff 50 -axiom.deterministic -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 25" ] diff --git a/src/main/resources/fine_tuning/params/params.map.robust04-paper2-folds.bm25+ax.json b/src/main/resources/fine_tuning/params/params.map.robust04-paper2-folds.bm25+ax.json index 7ae63d34f..5d2834a44 100644 --- a/src/main/resources/fine_tuning/params/params.map.robust04-paper2-folds.bm25+ax.json +++ b/src/main/resources/fine_tuning/params/params.map.robust04-paper2-folds.bm25+ax.json @@ -1,5 +1,5 @@ -[ "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.50 -rerankCutoff 50 -axiom.deterministic -axiom.n 30 -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 25", - "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.50 -rerankCutoff 50 -axiom.deterministic -axiom.n 30 -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 25", - "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.50 -rerankCutoff 50 -axiom.deterministic -axiom.n 30 -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 25", - "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.60 -rerankCutoff 50 -axiom.deterministic -axiom.n 30 -axiom.seed 42 -axiom.r 15 -axiom.n 30 -axiom.beta 0.35 -axiom.top 45", - "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.55 -rerankCutoff 50 -axiom.deterministic -axiom.n 30 -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 50" ] +[ "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.50 -rerankCutoff 50 -axiom.deterministic -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 25", + "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.50 -rerankCutoff 50 -axiom.deterministic -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 25", + "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.50 -rerankCutoff 50 -axiom.deterministic -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 25", + "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.60 -rerankCutoff 50 -axiom.deterministic -axiom.seed 42 -axiom.r 15 -axiom.n 30 -axiom.beta 0.35 -axiom.top 45", + "-bm25 -axiom -bm25.k1 0.80 -bm25.b 0.55 -rerankCutoff 50 -axiom.deterministic -axiom.seed 42 -axiom.r 10 -axiom.n 30 -axiom.beta 0.30 -axiom.top 50" ]