e63c463a3200d9843bc5be6c1c3ee36fb267cbde,matchzoo/engine/param_table.py,ParamTable,hyper_space,#ParamTable#,57

Before Change


    @property
    def hyper_space(self) -> dict:
        :return: Hyper space of the table, a valid `hyperopt` graph.
        return {
            param.name: param.hyper_space
            for param in self._params.values()
            if param.hyper_space is not None
        }

    def __getitem__(self, key: str) -> typing.Any:
        :return: The value of the parameter in the table named `key`.
        return self._params[key].value

After Change


    @property
    def hyper_space(self) -> dict:
        :return: Hyper space of the table, a valid `hyperopt` graph.
        full_space = {}
        for param in self:
            if param.hyper_space is not None:
                param_space = param.hyper_space
                if isinstance(param_space, hyper_spaces.HyperoptProxy):
                    param_space = param_space(param.name)
                full_space[param.name] = param_space
        return full_space

    def __getitem__(self, key: str) -> typing.Any:
        :return: The value of the parameter in the table named `key`.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: NTMC-Community/MatchZoo
Commit Name: e63c463a3200d9843bc5be6c1c3ee36fb267cbde
Time: 2018-12-29
Author: i@uduse.com
File Name: matchzoo/engine/param_table.py
Class Name: ParamTable
Method Name: hyper_space


Project Name: catalyst-team/catalyst
Commit Name: 45f7651644f05b413ecd9366e7014edc7f0b8a24
Time: 2019-09-06
Author: scitator@gmail.com
File Name: catalyst/contrib/modules/lama.py
Class Name: LamaPooling
Method Name: __init__


Project Name: allenai/allennlp
Commit Name: 02d5ddeef16a767bc77f9845bccc9ad4c47ad239
Time: 2020-03-17
Author: wuzhaofeng1997@gmail.com
File Name: allennlp/data/token_indexers/pretrained_transformer_indexer.py
Class Name: PretrainedTransformerIndexer
Method Name: as_padded_tensor_dict