def should_stop(self):
        """Check if the search should stop."""
        # NOTE: Individual goal criteria is checked at the end of each step in the iteration loop
        return ((self.config.max_iter is not None) and (self._iteration_count > self.config.max_iter)) or (
            (self.config.max_time is not None) and (self.elapsed_time > self.config.max_time)
        )
Check if the search should stop.
olive/search/search_strategy.py