diff options
author | Namhoon Kim <namhoonk@cs.unc.edu> | 2017-04-03 23:35:59 -0400 |
---|---|---|
committer | Namhoon Kim <namhoonk@cs.unc.edu> | 2017-04-03 23:35:59 -0400 |
commit | fb72dd09cfc16d0260363d38df1225b6663bc084 (patch) | |
tree | db1472467249286171d3e35c4b7a77c165571892 /run_exps.py | |
parent | e15736509ab36e33bc71a0fe1120f2974e389725 (diff) |
MC2 supportHEADmc2-supportmaster
Diffstat (limited to 'run_exps.py')
-rwxr-xr-x | run_exps.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/run_exps.py b/run_exps.py index 21666a9..6b61c86 100755 --- a/run_exps.py +++ b/run_exps.py | |||
@@ -216,7 +216,7 @@ def run_script(script_params, exp, exp_dir, out_dir): | |||
216 | if type(script_params) != type([]): | 216 | if type(script_params) != type([]): |
217 | script_params = [script_params] | 217 | script_params = [script_params] |
218 | 218 | ||
219 | exp.log("Running %s" % script_params.join(" ")) | 219 | exp.log("Running %s" % script_params) |
220 | 220 | ||
221 | script_name = script_params.pop(0) | 221 | script_name = script_params.pop(0) |
222 | script = com.get_executable(script_name, cwd=exp_dir) | 222 | script = com.get_executable(script_name, cwd=exp_dir) |
@@ -443,8 +443,9 @@ def run_exps(exps, opts): | |||
443 | exps_remaining = enumerate(exps) | 443 | exps_remaining = enumerate(exps) |
444 | # But run experiments which have failed the most last | 444 | # But run experiments which have failed the most last |
445 | exps_remaining = sorted(exps_remaining, key=lambda x: get_tries(x[1])) | 445 | exps_remaining = sorted(exps_remaining, key=lambda x: get_tries(x[1])) |
446 | finished = 0 | ||
446 | 447 | ||
447 | while exps_remaining: | 448 | while exps_remaining and finished < 3: |
448 | i, exp = exps_remaining.pop(0) | 449 | i, exp = exps_remaining.pop(0) |
449 | 450 | ||
450 | verb = "Loading" if exp.state == ExpState.None else "Re-running failed" | 451 | verb = "Loading" if exp.state == ExpState.None else "Re-running failed" |
@@ -456,7 +457,7 @@ def run_exps(exps, opts): | |||
456 | raise Exception("Hit maximum retries of %d" % MAX_RETRY) | 457 | raise Exception("Hit maximum retries of %d" % MAX_RETRY) |
457 | 458 | ||
458 | run_experiment(exp, start_message, opts.ignore, jabber) | 459 | run_experiment(exp, start_message, opts.ignore, jabber) |
459 | 460 | finished += 1 | |
460 | set_tries(exp, 0) | 461 | set_tries(exp, 0) |
461 | exp.state = ExpState.Succeeded | 462 | exp.state = ExpState.Succeeded |
462 | except KeyboardInterrupt: | 463 | except KeyboardInterrupt: |