diff options
Diffstat (limited to 'run_exps.py')
-rwxr-xr-x | run_exps.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/run_exps.py b/run_exps.py index dc15701..6873877 100755 --- a/run_exps.py +++ b/run_exps.py | |||
@@ -15,12 +15,11 @@ from run.experiment import Experiment,ExperimentDone | |||
15 | from run.proc_entry import ProcEntry | 15 | from run.proc_entry import ProcEntry |
16 | 16 | ||
17 | class InvalidKernel(Exception): | 17 | class InvalidKernel(Exception): |
18 | def __init__(self, kernel, wanted): | 18 | def __init__(self, kernel): |
19 | self.kernel = kernel | 19 | self.kernel = kernel |
20 | self.wanted = wanted | ||
21 | 20 | ||
22 | def __str__(self): | 21 | def __str__(self): |
23 | return "Kernel '%s' does not match '%s'." % (self.kernel, self.wanted) | 22 | return "Kernel name does not match '%s'." % self.kernel |
24 | 23 | ||
25 | ConfigResult = namedtuple('ConfigResult', ['param', 'wanted', 'actual']) | 24 | ConfigResult = namedtuple('ConfigResult', ['param', 'wanted', 'actual']) |
26 | class InvalidConfig(Exception): | 25 | class InvalidConfig(Exception): |
@@ -119,7 +118,7 @@ def load_experiment(sched_file, scheduler, duration, param_file, out_dir): | |||
119 | exp_name = os.path.split(dir_name)[1] + "/" + fname | 118 | exp_name = os.path.split(dir_name)[1] + "/" + fname |
120 | 119 | ||
121 | params = {} | 120 | params = {} |
122 | kernel = "" | 121 | kernel = copts = "" |
123 | 122 | ||
124 | param_file = param_file or \ | 123 | param_file = param_file or \ |
125 | "%s/%s" % (dir_name, conf.DEFAULTS['params_file']) | 124 | "%s/%s" % (dir_name, conf.DEFAULTS['params_file']) |
@@ -259,7 +258,7 @@ def main(): | |||
259 | print("Experiment '%s' already completed at '%s'" % (exp, out_base)) | 258 | print("Experiment '%s' already completed at '%s'" % (exp, out_base)) |
260 | except (InvalidKernel, InvalidConfig) as e: | 259 | except (InvalidKernel, InvalidConfig) as e: |
261 | invalid += 1 | 260 | invalid += 1 |
262 | print("Invalid environment for experiment '%s'") | 261 | print("Invalid environment for experiment '%s'" % exp) |
263 | print(e) | 262 | print(e) |
264 | except: | 263 | except: |
265 | print("Failed experiment %s" % exp) | 264 | print("Failed experiment %s" % exp) |
@@ -273,7 +272,7 @@ def main(): | |||
273 | print(" Successful:\t\t%d" % succ) | 272 | print(" Successful:\t\t%d" % succ) |
274 | print(" Failed:\t\t%d" % failed) | 273 | print(" Failed:\t\t%d" % failed) |
275 | print(" Already Done:\t\t%d" % done) | 274 | print(" Already Done:\t\t%d" % done) |
276 | print(" Invalid environment:\t\t%d" % invalid) | 275 | print(" Invalid Environment:\t%d" % invalid) |
277 | 276 | ||
278 | 277 | ||
279 | if __name__ == '__main__': | 278 | if __name__ == '__main__': |