diff --git a/golem/core/optimisers/populational_optimizer.py b/golem/core/optimisers/populational_optimizer.py index 3f9236b9c..14f92d513 100644 --- a/golem/core/optimisers/populational_optimizer.py +++ b/golem/core/optimisers/populational_optimizer.py @@ -132,7 +132,8 @@ def _extend_population(self, pop: PopulationT, target_pop_size: int) -> Populati def _update_population(self, next_population: PopulationT, label: Optional[str] = None, metadata: Optional[Dict[str, Any]] = None): self.generations.append(next_population) - self._log_to_history(next_population, label, metadata) + if self.requirements.keep_history: + self._log_to_history(next_population, label, metadata) self._iteration_callback(next_population, self) self.population = next_population