diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-03-18 17:49:23 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-03-18 17:49:23 -0400 |
commit | 36a56e31db846706cb2cbcb61d5783e7af11391a (patch) | |
tree | acf95f706bcd4f67ce1edd4fbcbeab08726003ab /plot_exps.py | |
parent | 5f31b2e274399cd18ac96e887d9672ce221469d0 (diff) |
Allow csvs in plot_exps which don't have configurations in their name.
Diffstat (limited to 'plot_exps.py')
-rwxr-xr-x | plot_exps.py | 8 |
1 files changed, 6 insertions, 2 deletions
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): | |||
51 | # formatted plots | 51 | # formatted plots |
52 | for line_path, line_node in details.node.children.iteritems(): | 52 | for line_path, line_node in details.node.children.iteritems(): |
53 | encoded = line_path[:line_path.index(".csv")] | 53 | encoded = line_path[:line_path.index(".csv")] |
54 | line_config = ColMap.decode(encoded) | 54 | |
55 | try: | ||
56 | line_config = ColMap.decode(encoded) | ||
57 | except: | ||
58 | line_config = {'name': encoded} | ||
55 | 59 | ||
56 | for k, v in line_config.iteritems(): | 60 | for k, v in line_config.iteritems(): |
57 | builder.try_add(k, v) | 61 | builder.try_add(k, v) |
@@ -115,7 +119,7 @@ def plot_dir(data_dir, out_dir, force): | |||
115 | if not plot_details: | 119 | if not plot_details: |
116 | return | 120 | return |
117 | 121 | ||
118 | procs = min(len(plot_details), cpu_count()/2) | 122 | procs = min(len(plot_details), max(cpu_count()/2, 1)) |
119 | pool = Pool(processes=procs) | 123 | pool = Pool(processes=procs) |
120 | enum = pool.imap_unordered(plot_wrapper, plot_details) | 124 | enum = pool.imap_unordered(plot_wrapper, plot_details) |
121 | 125 | ||