abbee966de8fbd69dbb00217fbfc683f9007948f,optuna/samplers/_search_space.py,IntersectionSearchSpace,calculate,#IntersectionSearchSpace#Any#Any#,27

Before Change


            if self._study_id != study._study_id:
                raise ValueError("`IntersectionSearchSpace` cannot handle multiple studies.")

        for trial in study.get_trials(deepcopy=False):
            if trial.state != optuna.trial.TrialState.COMPLETE:
                continue

After Change


                raise ValueError("`IntersectionSearchSpace` cannot handle multiple studies.")

        next_cursor = self._cursor
        for trial in reversed(study.get_trials(deepcopy=False)):
            if self._cursor > trial.number:
                break

            if trial.state == optuna.trial.TrialState.RUNNING:
                next_cursor = trial.number

            if trial.state != optuna.trial.TrialState.COMPLETE:
                continue

            if self._search_space is None:
                self._search_space = copy.copy(trial.distributions)
                continue

            delete_list = []
            for param_name, param_distribution in self._search_space.items():
                if param_name not in trial.distributions:
                    delete_list.append(param_name)
                elif trial.distributions[param_name] != param_distribution:
                    delete_list.append(param_name)

            for param_name in delete_list:
                del self._search_space[param_name]

        self._cursor = next_cursor
        search_space = self._search_space or {}

        if ordered_dict:
            search_space = OrderedDict(sorted(search_space.items(), key=lambda x: x[0]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: pfnet/optuna
Commit Name: abbee966de8fbd69dbb00217fbfc683f9007948f
Time: 2020-04-20
Author: contact@c-bata.link
File Name: optuna/samplers/_search_space.py
Class Name: IntersectionSearchSpace
Method Name: calculate


Project Name: pfnet/optuna
Commit Name: c0c3eff0a4dfb697cb1c76f55bd33a3d3946ff86
Time: 2020-05-15
Author: phjgt308@gmail.com
File Name: optuna/multi_objective/samplers/_nsga2.py
Class Name: NSGAIIMultiObjectiveSampler
Method Name: _collect_parent_population


Project Name: pfnet/optuna
Commit Name: 2a52ce843b00ac268474d61b20c6ed4941848b20
Time: 2020-05-12
Author: phjgt308@gmail.com
File Name: optuna/multi_objective/samplers/_nsga2.py
Class Name: NSGAIIMultiObjectiveSampler
Method Name: _collect_parent_population


Project Name: pfnet/optuna
Commit Name: 7efee0558712883dd02400b4976e266c8e782f29
Time: 2020-04-27
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: optuna/pruners/hyperband.py
Class Name: HyperbandPruner
Method Name: _try_initialization