44be9703a0744caf78b8b61319be0db281e91d6a,skopt/space/space.py,Space,from_yaml,#Any#Any#Any#,556

Before Change


        with open(yml_path, "rb") as f:
            cfg = yaml.load(f)

        this_module = sys.modules[__name__]
        // Dynamically create list of subclass names for Dimension
        dimension_classes = ["Real", "Integer", "Categorical"]

        // Extract space options for configuration file

After Change


                             "categorical": Categorical}

        // Extract space options for configuration file
        if isinstance(config, dict):
            if namespace is None:
                options = next(iter(config.values()))
            else:
                options = config[namespace]
        elif isinstance(config, list):
            options = config
        else:
            raise TypeError("YaML does not specify a list or dictionary")

        // Populate list with Dimension objects
        dimensions = []
        for option in options:
            key = next(iter(option.keys()))
            // Make configuration case insensitive
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: scikit-optimize/scikit-optimize
Commit Name: 44be9703a0744caf78b8b61319be0db281e91d6a
Time: 2018-04-06
Author: scott_graham@bose.com
File Name: skopt/space/space.py
Class Name: Space
Method Name: from_yaml


Project Name: PetrochukM/PyTorch-NLP
Commit Name: 6a5916968838686e332fb68a10cb30222843fbd9
Time: 2018-04-26
Author: florian.joh.schaefer@gmail.com
File Name: torchnlp/word_to_vector/pretrained_word_vectors.py
Class Name: _PretrainedWordVectors
Method Name: __getitem__


Project Name: shaypal5/pdpipe
Commit Name: 71a900bce8f2544ee8d560241349d43f5d29164f
Time: 2017-03-17
Author: shaypal5@gmail.com
File Name: pdpipe/basic_stages.py
Class Name: ColByFunc
Method Name: _op