src/orion/core/worker/producer.py
def _update_naive_algorithm(self, incomplete_trials):
        """Pull all non completed trials to update naive model."""
        self.naive_algorithm = copy.deepcopy(self.algorithm)
        self.naive_trials_history = copy.deepcopy(self.trials_history)
        log.debug("### Create fake trials to observe:")
        lying_trials = self._produce_lies(incomplete_trials)
        log.debug("### %s", lying_trials)
        if lying_trials:
            log.debug("### Convert them to list of points and their results.")
            points = list(
                map(
                    lambda trial: format_trials.trial_to_tuple(trial, self.space),
                    lying_trials,
                )
            )
            results = list(map(format_trials.get_trial_results, lying_trials))

            log.debug("### Observe them.")
            self.naive_trials_history.update(lying_trials)
            self.naive_algorithm.observe(points, results)
            self._update_params_hashes(lying_trials)
Pull all non completed trials to update naive model.
Pull all non completed trials to update naive model.
Pull all non completed trials to update naive model .
def _update_naive_algorithm(self, incomplete_trials):
        self.naive_algorithm = copy.deepcopy(self.algorithm)
        self.naive_trials_history = copy.deepcopy(self.trials_history)
        log.debug("### Create fake trials to observe:")
        lying_trials = self._produce_lies(incomplete_trials)
        log.debug("### %s", lying_trials)
        if lying_trials:
            log.debug("### Convert them to list of points and their results.")
            points = list(
                map(
                    lambda trial: format_trials.trial_to_tuple(trial, self.space),
                    lying_trials,
                )
            )
            results = list(map(format_trials.get_trial_results, lying_trials))
            log.debug("### Observe them.")
            self.naive_trials_history.update(lying_trials)
            self.naive_algorithm.observe(points, results)
            self._update_params_hashes(lying_trials)
def _update_naive_algorithm ( self , incomplete_trials ) : self . naive_algorithm = copy . deepcopy ( self . algorithm ) self . naive_trials_history = copy . deepcopy ( self . trials_history ) log . debug ( "### Create fake trials to observe:" ) lying_trials = self . _produce_lies ( incomplete_trials ) log . debug ( "### %s" , lying_trials ) if lying_trials : log . debug ( "### Convert them to list of points and their results." ) points = list ( map ( lambda trial : format_trials . trial_to_tuple ( trial , self . space ) , lying_trials , ) ) results = list ( map ( format_trials . get_trial_results , lying_trials ) ) log . debug ( "### Observe them." ) self . naive_trials_history . update ( lying_trials ) self . naive_algorithm . observe ( points , results ) self . _update_params_hashes ( lying_trials )
Pull all non completed trials to update naive model.
Pull all non completed trials to update naive model .
"""Pull all non completed trials to update naive model."""
self
incomplete_trials