Skip to content

Commit

Permalink
Fix bug in run_regression re: scoping of variables (castorini#1731)
Browse files Browse the repository at this point in the history
  • Loading branch information
lintool authored Jan 14, 2022
1 parent a62aca0 commit 1631e9c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/python/run_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ def evaluate_and_verify(yaml_data, dry_run):

def run_search(cmd):
logger.info(' '.join(cmd))
if not args.dry_run:
call(' '.join(cmd), shell=True)
call(' '.join(cmd), shell=True)


if __name__ == '__main__':
Expand Down Expand Up @@ -225,7 +224,11 @@ def run_search(cmd):
if args.search:
logger.info('='*10 + ' Ranking ' + '='*10)
search_cmds = construct_search_commands(yaml_data)
p = Pool(args.search_pool)
p.map(run_search, search_cmds)
if args.dry_run:
for cmd in search_cmds:
logger.info(' '.join(cmd))
else:
p = Pool(args.search_pool)
p.map(run_search, search_cmds)

evaluate_and_verify(yaml_data, args.dry_run)

0 comments on commit 1631e9c

Please sign in to comment.