src/orion/core/worker/producer.py
def _update_algorithm(self, completed_trials):
        """Pull newest completed trials to update local model."""
        log.debug("### Fetch completed trials to observe:")

        new_completed_trials = []
        for trial in completed_trials:
            if trial not in self.trials_history:
                new_completed_trials.append(trial)

        log.debug("### %s", new_completed_trials)

        if new_completed_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),
                    new_completed_trials,
                )
            )
            results = list(map(format_trials.get_trial_results, new_completed_trials))

            log.debug("### Observe them.")
            self.trials_history.update(new_completed_trials)
            self.algorithm.observe(points, results)
            self.strategy.observe(points, results)
            self._update_params_hashes(new_completed_trials)
Pull newest completed trials to update local model.
Pull newest completed trials to update local model.
Pull newest completed trials to update local model .
def _update_algorithm(self, completed_trials):
        log.debug("### Fetch completed trials to observe:")
        new_completed_trials = []
        for trial in completed_trials:
            if trial not in self.trials_history:
                new_completed_trials.append(trial)
        log.debug("### %s", new_completed_trials)
        if new_completed_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),
                    new_completed_trials,
                )
            )
            results = list(map(format_trials.get_trial_results, new_completed_trials))
            log.debug("### Observe them.")
            self.trials_history.update(new_completed_trials)
            self.algorithm.observe(points, results)
            self.strategy.observe(points, results)
            self._update_params_hashes(new_completed_trials)
def _update_algorithm ( self , completed_trials ) : log . debug ( "### Fetch completed trials to observe:" ) new_completed_trials = [ ] for trial in completed_trials : if trial not in self . trials_history : new_completed_trials . append ( trial ) log . debug ( "### %s" , new_completed_trials ) if new_completed_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 ) , new_completed_trials , ) ) results = list ( map ( format_trials . get_trial_results , new_completed_trials ) ) log . debug ( "### Observe them." ) self . trials_history . update ( new_completed_trials ) self . algorithm . observe ( points , results ) self . strategy . observe ( points , results ) self . _update_params_hashes ( new_completed_trials )
Pull newest completed trials to update local model.
Pull newest completed trials to update local model .
"""Pull newest completed trials to update local model."""
self
completed_trials