Fix for more arguments

This commit is contained in:
Fredrik81 2020-02-29 23:57:15 +01:00
parent 7a4edb1cd8
commit e89fd33229

View File

@ -557,7 +557,7 @@ class Hyperopt:
cpus = cpu_count() cpus = cpu_count()
logger.info(f"Found {cpus} CPU cores. Let's make them scream!") logger.info(f"Found {cpus} CPU cores. Let's make them scream!")
config_jobs = self.config.get('hyperopt_jobs', -1) config_jobs = self.config.get('hyperopt_jobs', -1)
if self.total_epochs < cpus: if self.total_epochs < cpus and (config_jobs > self.total_epochs or config_jobs < 0):
config_jobs = self.total_epochs config_jobs = self.total_epochs
logger.info(f'Number of parallel jobs set as: {config_jobs}') logger.info(f'Number of parallel jobs set as: {config_jobs}')