Skip to content

Commit

Permalink
Update Lucene8 option in run_regression.py (#1971)
Browse files Browse the repository at this point in the history
SearchCollection automatically adjusts tie-breaking behavior if it detects a Lucene 8 index:
Update run_regression script accordingly.
  • Loading branch information
lintool authored Sep 10, 2022
1 parent 7a18f14 commit 760dab0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/python/run_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ def construct_search_commands(yaml_data):
'-topics', os.path.join(yaml_data['topic_root'], topic_set['path']),
'-topicreader', topic_set['topic_reader'] if 'topic_reader' in topic_set and topic_set['topic_reader'] else yaml_data['topic_reader'],
'-output', construct_runfile_path(yaml_data['corpus'], topic_set['id'], model['name']),
model['params'],
'-lucene8' if args.lucene8 else ''
model['params']
]
for (model, topic_set) in list(itertools.product(yaml_data['models'], yaml_data['topics']))
]
Expand Down Expand Up @@ -289,7 +288,7 @@ def download_url(url, save_dir, local_filename=None, md5=None, force=False, verb
help='Number of converting runs to execute in parallel.')
parser.add_argument('--dry-run', dest='dry_run', action='store_true',
help='Output commands without actual execution.')
parser.add_argument('--lucene8', dest='lucene8', action='store_true', help='Enable Lucene 8 index compatibility.')
parser.add_argument('--lucene8', dest='lucene8', action='store_true', help='Enable more lenient score matching for Lucene 8 index compatibility.')
args = parser.parse_args()

with open('src/main/resources/regression/{}.yaml'.format(args.regression)) as f:
Expand Down

0 comments on commit 760dab0

Please sign in to comment.