From fb72dd09cfc16d0260363d38df1225b6663bc084 Mon Sep 17 00:00:00 2001 From: Namhoon Kim Date: Tue, 4 Apr 2017 03:35:59 +0000 Subject: MC2 support --- run_exps.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'run_exps.py') 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): if type(script_params) != type([]): script_params = [script_params] - exp.log("Running %s" % script_params.join(" ")) + exp.log("Running %s" % script_params) script_name = script_params.pop(0) script = com.get_executable(script_name, cwd=exp_dir) @@ -443,8 +443,9 @@ def run_exps(exps, opts): exps_remaining = enumerate(exps) # But run experiments which have failed the most last exps_remaining = sorted(exps_remaining, key=lambda x: get_tries(x[1])) + finished = 0 - while exps_remaining: + while exps_remaining and finished < 3: i, exp = exps_remaining.pop(0) verb = "Loading" if exp.state == ExpState.None else "Re-running failed" @@ -456,7 +457,7 @@ def run_exps(exps, opts): raise Exception("Hit maximum retries of %d" % MAX_RETRY) run_experiment(exp, start_message, opts.ignore, jabber) - + finished += 1 set_tries(exp, 0) exp.state = ExpState.Succeeded except KeyboardInterrupt: -- cgit v1.2.2