Skip to content

Commit

Permalink
More tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
lintool committed Sep 17, 2023
1 parent 1a496d0 commit b2bf3bd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
10 changes: 4 additions & 6 deletions src/main/python/fine_tuning/reconstruct_robus04_tuned_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Original file line number Diff line number Diff line change
@@ -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" ]
Original file line number Diff line number Diff line change
@@ -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" ]

0 comments on commit b2bf3bd

Please sign in to comment.