1065e85b335904177060014b1b6775ecd975a643,optuna/samplers/grid.py,GridSampler,sample_relative,#GridSampler#Any#Any#Any#,101

Before Change



        unvisited_grids = self._get_unvisited_grid_ids(study)

        if len(unvisited_grids) == 0:
            raise ValueError("All grids have been evaluated. If you want to avoid this error, "
                             "please make sure that unnecessary trials do not run during "
                             "optimization by properly setting `n_trials` in `study.optimize`.")

        // In distributed optimization, multiple workers may simultaneously pick up the same grid.
        // To make the conflict less frequent, the grid is chosen randomly.
        grid_id = random.choice(unvisited_grids)

        study._storage.set_trial_system_attr(trial._trial_id, "search_space", self._search_space)
        study._storage.set_trial_system_attr(trial._trial_id, "grid_id", grid_id)

After Change



        target_grids = self._get_unvisited_grid_ids(study)

        if len(target_grids) == 0:
            _logger.warning("`GridSampler` is evaluating a duplicated point because all grids "
                            "have been evaluated. This may happen due to a timing issue during "
                            "distributed optimization or an unnecessary number of `n_trials`.")

            study.stop()
            target_grids = list(range(len(self._all_grids)))

        // In distributed optimization, multiple workers may simultaneously pick up the same grid.
        // To make the conflict less frequent, the grid is chosen randomly.
        grid_id = random.choice(target_grids)

        study._storage.set_trial_system_attr(trial._trial_id, "search_space", self._search_space)
        study._storage.set_trial_system_attr(trial._trial_id, "grid_id", grid_id)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: pfnet/optuna
Commit Name: 1065e85b335904177060014b1b6775ecd975a643
Time: 2020-03-13
Author: sano@preferred.jp
File Name: optuna/samplers/grid.py
Class Name: GridSampler
Method Name: sample_relative


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 9a3a5f4ecfc2bdb2e6b34feec20869528d5d7661
Time: 2020-09-28
Author: M.N.Tran@ibm.com
File Name: art/estimators/classification/pytorch.py
Class Name: PyTorchClassifier
Method Name: __init__


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: d5801e31dafe0320109862e9cd216213e62e92b5
Time: 2020-06-25
Author: M.N.Tran@ibm.com
File Name: art/estimators/object_detection/tensorflow_faster_rcnn.py
Class Name: TensorFlowFasterRCNN
Method Name: __init__