diff --git a/CHANGELOG.md b/CHANGELOG.md index 616e77e..c28d65c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +# [2.2.26] - 2023-11-15 + +- Fix memory usage, limit threads + # [2.2.25] - 2023-11-15 - Fixed multiprocessing diff --git a/deeplc/deeplc.py b/deeplc/deeplc.py index 9ca9bc4..fd2d3d3 100644 --- a/deeplc/deeplc.py +++ b/deeplc/deeplc.py @@ -249,10 +249,12 @@ def __init__( self.n_jobs = n_jobs max_threads = multiprocessing.cpu_count() + # Hard limit the number of threads if not provided as + # most times it will run into a memory issue otherwise if not self.n_jobs: - self.n_jobs = max_threads + self.n_jobs = int(max_threads / 5.0) + 1 elif self.n_jobs > max_threads: - self.n_jobs = max_threads + self.n_jobs = int(max_threads / 5.0) + 1 self.use_library = use_library self.write_library = write_library diff --git a/setup.py b/setup.py index d7ec175..2a3f1dd 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name="deeplc", - version="2.2.25", + version="2.2.26", license="apache-2.0", description="DeepLC: Retention time prediction for (modified) peptides using Deep Learning.", long_description=LONG_DESCRIPTION,