diff --git a/workflows/common/python/ga_utils.py b/workflows/common/python/ga_utils.py index f3747520..06e11f4b 100644 --- a/workflows/common/python/ga_utils.py +++ b/workflows/common/python/ga_utils.py @@ -90,7 +90,10 @@ def randomDraw(self): if self.use_log_scale: log_lower = math.log10(self.lower) log_upper = math.log10(self.upper) - return self.log_uniform(log_lower, log_upper) + # Generate a random value in log scale + random_log_value = self.log_uniform(log_lower, log_upper) + # Convert it back to the original scale + return 10 ** random_log_value else: return super(FloatParameter, self).randomDraw()