src/orion/core/worker/producer.py
def produce(self):
        """Create and register new trials."""
        sampled_points = 0

        # reset the number of time we failed to sample points
        self.failure_count = 0
        start = time.time()

        while sampled_points < self.pool_size and not (
            self.experiment.is_done or self.naive_algorithm.is_done
        ):
            self._sample_guard(start)

            log.debug("### Algorithm suggests new points.")
            new_points = self.naive_algorithm.suggest(self.pool_size)

            # Sync state of original algo so that state continues evolving.
            self.algorithm.set_state(self.naive_algorithm.state_dict)

            if new_points is None:
                if self.algorithm.is_done:
                    return

                raise WaitingForTrials(
                    "Algo does not have more trials to sample."
                    "Waiting for current trials to finish"
                )

            for new_point in new_points:
                sampled_points += self.register_trials(new_point)
Create and register new trials.
Create and register new trials.
Create and register new trials .
def produce(self):
        sampled_points = 0
        self.failure_count = 0
        start = time.time()
        while sampled_points < self.pool_size and not (
            self.experiment.is_done or self.naive_algorithm.is_done
        ):
            self._sample_guard(start)
            log.debug("### Algorithm suggests new points.")
            new_points = self.naive_algorithm.suggest(self.pool_size)
            self.algorithm.set_state(self.naive_algorithm.state_dict)
            if new_points is None:
                if self.algorithm.is_done:
                    return
                raise WaitingForTrials(
                    "Algo does not have more trials to sample."
                    "Waiting for current trials to finish"
                )
            for new_point in new_points:
                sampled_points += self.register_trials(new_point)
def produce ( self ) : sampled_points = 0 self . failure_count = 0 start = time . time ( ) while sampled_points < self . pool_size and not ( self . experiment . is_done or self . naive_algorithm . is_done ) : self . _sample_guard ( start ) log . debug ( "### Algorithm suggests new points." ) new_points = self . naive_algorithm . suggest ( self . pool_size ) self . algorithm . set_state ( self . naive_algorithm . state_dict ) if new_points is None : if self . algorithm . is_done : return raise WaitingForTrials ( "Algo does not have more trials to sample." "Waiting for current trials to finish" ) for new_point in new_points : sampled_points += self . register_trials ( new_point )
Create and register new trials.
Create and register new trials .
"""Create and register new trials.""" # reset the number of time we failed to sample points # Sync state of original algo so that state continues evolving.
self