From 36a56e31db846706cb2cbcb61d5783e7af11391a Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Mon, 18 Mar 2013 17:49:23 -0400 Subject: Allow csvs in plot_exps which don't have configurations in their name. --- plot_exps.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plot_exps.py') diff --git a/plot_exps.py b/plot_exps.py index affe231..3b5636b 100755 --- a/plot_exps.py +++ b/plot_exps.py @@ -51,7 +51,11 @@ def plot_by_variable(details): # formatted plots for line_path, line_node in details.node.children.iteritems(): encoded = line_path[:line_path.index(".csv")] - line_config = ColMap.decode(encoded) + + try: + line_config = ColMap.decode(encoded) + except: + line_config = {'name': encoded} for k, v in line_config.iteritems(): builder.try_add(k, v) @@ -115,7 +119,7 @@ def plot_dir(data_dir, out_dir, force): if not plot_details: return - procs = min(len(plot_details), cpu_count()/2) + procs = min(len(plot_details), max(cpu_count()/2, 1)) pool = Pool(processes=procs) enum = pool.imap_unordered(plot_wrapper, plot_details) -- cgit v1.2.2