From 7e61f013c34392c0bffca16036a5db8ccb2d7867 Mon Sep 17 00:00:00 2001 From: GwydionJon Date: Thu, 27 Jun 2024 16:55:18 +0200 Subject: [PATCH] removed multiprocess for github ci to finish --- organelle_morphology/util.py | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/organelle_morphology/util.py b/organelle_morphology/util.py index e39c4f8..6b39057 100644 --- a/organelle_morphology/util.py +++ b/organelle_morphology/util.py @@ -1,7 +1,8 @@ import contextlib import cachetools import hashlib -import multiprocess + +# import multiprocess import shelved_cache import xdg from tqdm import tqdm @@ -36,21 +37,24 @@ def disk_cache(project, name, maxsize=10000): cache.close() -@contextlib.contextmanager -def parallel_pool(total=None, cores=None): - """A context manager that runs the code in parallel""" - # Create a process pool +# not sure yet wether to fully remove it or try to integrate it again. + + +# @contextlib.contextmanager +# def parallel_pool(total=None, cores=None): +# """A context manager that runs the code in parallel""" +# # Create a process pool - pool = multiprocess.Pool(cores) +# pool = multiprocess.Pool(cores) - # Run the code in parallel - if total: - pbar = tqdm(total=total) - yield pool, pbar +# # Run the code in parallel +# if total: +# pbar = tqdm(total=total) +# yield pool, pbar - else: - yield pool +# else: +# yield pool - # Close the pool - pool.close() - pool.join() +# # Close the pool +# pool.close() +# pool.join()