From 546446e36e7e68b527767d6c31ec341a49df2059 Mon Sep 17 00:00:00 2001 From: Kendell Clement Date: Tue, 14 Feb 2023 16:26:23 -0500 Subject: [PATCH] Fix running plots in parallel (#286) 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 --- CRISPResso2/CRISPRessoMultiProcessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRISPResso2/CRISPRessoMultiProcessing.py b/CRISPResso2/CRISPRessoMultiProcessing.py index e89ccce4..47d72c56 100644 --- a/CRISPResso2/CRISPRessoMultiProcessing.py +++ b/CRISPResso2/CRISPRessoMultiProcessing.py @@ -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)