aboutsummaryrefslogtreecommitdiffstats
path: root/run_exps.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_exps.py')
-rwxr-xr-xrun_exps.py7
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: