505ffbb83f5179d55ce815a710126bc503ab2b8f,optuna/pruners/hyperband.py,HyperbandPruner,__init__,#HyperbandPruner#Any#Any#Any#Any#Any#,93

Before Change



        _logger.debug("Hyperband has {} brackets".format(self._n_brackets))

        for i in range(self._n_brackets):
            trial_allocation_budget = self._calculate_trial_allocation_budget(i)
            self._total_trial_allocation_budget += trial_allocation_budget
            self._trial_allocation_budgets.append(trial_allocation_budget)

            // N.B. (crcrpar): `min_early_stopping_rate` has the information of `bracket_index`.
            min_early_stopping_rate = min_early_stopping_rate_low + i

            _logger.debug(
                "{}th bracket has minimum early stopping rate of {}".format(
                    i, min_early_stopping_rate
                )
            )

            pruner = SuccessiveHalvingPruner(
                min_resource=min_resource,
                reduction_factor=reduction_factor,
                min_early_stopping_rate=min_early_stopping_rate,
            )
            self._pruners.append(pruner)

    def prune(self, study: "optuna.study.Study", trial: FrozenTrial) -> bool:
        i = self._get_bracket_id(study, trial)
        _logger.debug("{}th bracket is selected".format(i))
        bracket_study = self._create_bracket_study(study, i)

After Change


        self._pruners = []  // type: List[SuccessiveHalvingPruner]
        self._total_trial_allocation_budget = 0
        self._trial_allocation_budgets = []  // type: List[int]
        self._running_trials = {}  // type: Dict[int, int]

        if n_brackets is not None:
            message = (
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pfnet/optuna
Commit Name: 505ffbb83f5179d55ce815a710126bc503ab2b8f
Time: 2020-04-26
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: optuna/pruners/hyperband.py
Class Name: HyperbandPruner
Method Name: __init__


Project Name: home-assistant/home-assistant
Commit Name: af8cd63838d035ad80420f4296cdbc312fe407ca
Time: 2018-05-05
Author: mail+github@tinloaf.de
File Name: homeassistant/components/notify/matrix.py
Class Name: MatrixNotificationService
Method Name: send_message


Project Name: home-assistant/home-assistant
Commit Name: d63028e44af753dd0df2e16273b0aa5e253fc859
Time: 2017-04-12
Author: turbokongen@hotmail.com
File Name: homeassistant/components/cover/zwave.py
Class Name: ZwaveRollershutter
Method Name: __init__