From 7a4edb1cd8f0c397bd16b19bcb67c4e0b7f40fd9 Mon Sep 17 00:00:00 2001 From: Fredrik81 Date: Sat, 29 Feb 2020 23:41:59 +0100 Subject: [PATCH] Fix: When total epochs is less than cpu cores --- freqtrade/optimize/hyperopt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index 66ea18bd1..ee3f4d2c4 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -557,6 +557,8 @@ class Hyperopt: cpus = cpu_count() logger.info(f"Found {cpus} CPU cores. Let's make them scream!") config_jobs = self.config.get('hyperopt_jobs', -1) + if self.total_epochs < cpus: + config_jobs = self.total_epochs logger.info(f'Number of parallel jobs set as: {config_jobs}') self.dimensions: List[Dimension] = self.hyperopt_space()