Skip to content

Commit

Permalink
Fix running plots in parallel (#286)
Browse files Browse the repository at this point in the history
The reason the plots were running slower before this change is because I was
calling the plot function, not passing it to `submit`. So it was essentially
running in serial, but worse because it was still spinning up/down the
processes.

Co-authored-by: Cole Lyman <cole@colelyman.com>
  • Loading branch information
kclem and Colelyman committed Feb 14, 2023
1 parent d75f32a commit 546446e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRISPResso2/CRISPRessoMultiProcessing.py
Expand Up @@ -272,6 +272,6 @@ def run_plot(plot_func, plot_args, num_processes, process_results, process_pool)
None
"""
if num_processes > 1:
process_results.append(process_pool.submit(plot_func(**plot_args)))
process_results.append(process_pool.submit(plot_func, **plot_args))
else:
plot_func(**plot_args)

0 comments on commit 546446e

Please sign in to comment.