src/orion/algo/hyperband.py
def promote(self):
        """Promote the first candidate that is found and return it

        The rungs are iterated over in reversed order, so that high rungs
        are prioritised for promotions. When a candidate is promoted, the loop is broken and
        the method returns the promoted point.

        .. note ::

            All trials are part of the rungs, for any state. Only completed trials
            are eligible for promotion, i.e., only completed trials can be part of top-k.
            Lookup for promotion in rung l + 1 contains trials of any status.

        """
        if self.is_done:
            return None

        for rung_id in range(len(self.rungs)):
            if self.has_rung_filled(rung_id + 1):
                continue

            if not self.is_ready(rung_id):
                return None

            points = []
            for candidate in self.get_candidates(rung_id):
                # pylint: disable=logging-format-interpolation
                logger.debug(
                    "Promoting {point} from rung {past_rung} with fidelity {past_fidelity} to "
                    "rung {new_rung} with fidelity {new_fidelity}".format(
                        point=candidate,
                        past_rung=rung_id,
                        past_fidelity=candidate[self.hyperband.fidelity_index],
                        new_rung=rung_id + 1,
                        new_fidelity=self.rungs[rung_id + 1]["resources"],
                    )
                )

                candidate = list(copy.deepcopy(candidate))
                candidate[self.hyperband.fidelity_index] = self.rungs[rung_id + 1][
                    "resources"
                ]
                points.append(tuple(candidate))

            return points

        return None
Promote the first candidate that is found and return it

        The rungs are iterated over in reversed order, so that high rungs
        are prioritised for promotions. When a candidate is promoted, the loop is broken and
        the method returns the promoted point.

        .. note ::

            All trials are part of the rungs, for any state. Only completed trials
            are eligible for promotion, i.e., only completed trials can be part of top-k.
            Lookup for promotion in rung l + 1 contains trials of any status.

        
Promote the first candidate that is found and return it
The rungs are iterated over in reversed order, so that high rungs
are prioritised for promotions. When a candidate is promoted, the loop is broken and
the method returns the promoted point.

note :.

All trials are part of the rungs, for any state. Only completed trials
are eligible for promotion, i.e., only completed trials can be part of top-k.
Lookup for promotion in rung l + 1 contains trials of any status.
Promote the first candidate that is found and return it The rungs are iterated over in reversed order so that high rungs are prioritised for promotions . When a candidate is promoted the loop is broken and the method returns the promoted point . note : . All trials are part of the rungs for any state . Only completed trials are eligible for promotion i . e . only completed trials can be part of top - k . Lookup for promotion in rung l + 1 contains trials of any status .
def promote(self):
        if self.is_done:
            return None
        for rung_id in range(len(self.rungs)):
            if self.has_rung_filled(rung_id + 1):
                continue
            if not self.is_ready(rung_id):
                return None
            points = []
            for candidate in self.get_candidates(rung_id):
                logger.debug(
                    "Promoting {point} from rung {past_rung} with fidelity {past_fidelity} to "
                    "rung {new_rung} with fidelity {new_fidelity}".format(
                        point=candidate,
                        past_rung=rung_id,
                        past_fidelity=candidate[self.hyperband.fidelity_index],
                        new_rung=rung_id + 1,
                        new_fidelity=self.rungs[rung_id + 1]["resources"],
                    )
                )
                candidate = list(copy.deepcopy(candidate))
                candidate[self.hyperband.fidelity_index] = self.rungs[rung_id + 1][
                    "resources"
                ]
                points.append(tuple(candidate))
            return points
        return None
def promote ( self ) : if self . is_done : return None for rung_id in range ( len ( self . rungs ) ) : if self . has_rung_filled ( rung_id + 1 ) : continue if not self . is_ready ( rung_id ) : return None points = [ ] for candidate in self . get_candidates ( rung_id ) : logger . debug ( "Promoting {point} from rung {past_rung} with fidelity {past_fidelity} to " "rung {new_rung} with fidelity {new_fidelity}" . format ( point = candidate , past_rung = rung_id , past_fidelity = candidate [ self . hyperband . fidelity_index ] , new_rung = rung_id + 1 , new_fidelity = self . rungs [ rung_id + 1 ] [ "resources" ] , ) ) candidate = list ( copy . deepcopy ( candidate ) ) candidate [ self . hyperband . fidelity_index ] = self . rungs [ rung_id + 1 ] [ "resources" ] points . append ( tuple ( candidate ) ) return points return None
Promote the first candidate that is found and return it
The rungs are iterated over in reversed order, so that high rungs
are prioritised for promotions.
Promote the first candidate that is found and return it The rungs are iterated over in reversed order so that high rungs are prioritised for promotions .
"""Promote the first candidate that is found and return it

        The rungs are iterated over in reversed order, so that high rungs
        are prioritised for promotions. When a candidate is promoted, the loop is broken and
        the method returns the promoted point.

        .. note ::

            All trials are part of the rungs, for any state. Only completed trials
            are eligible for promotion, i.e., only completed trials can be part of top-k.
            Lookup for promotion in rung l + 1 contains trials of any status.

        """ # pylint: disable=logging-format-interpolation
self