From d037b551b7877b7611fcc161006d82e1e148d6aa Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 3 Feb 2022 05:23:24 +0300 Subject: Use multiprocessing to speed up computation This commit refactors the code to make it possible to use multiprocessing to speed up the computation of the partial correlations. The major refactor is to move the `__compute_trait_info__` function to the top-level of the module, and provide to it all the other necessary context via the new args. --- gn3/settings.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gn3/settings.py') diff --git a/gn3/settings.py b/gn3/settings.py index c945fbf..87e8f4b 100644 --- a/gn3/settings.py +++ b/gn3/settings.py @@ -57,3 +57,5 @@ GNSHARE = os.environ.get("GNSHARE", "/gnshare/gn/") TEXTDIR = f"{GNSHARE}/web/ProbeSetFreeze_DataMatrix" ROUND_TO = 10 + +MULTIPROCESSOR_PROCS = 6 # Number of processes to spawn -- cgit v1.2.3