c472f856ac60d0fff63b90642d912d7e0db1c7dd,dataset/models/base.py,BaseModel,get_from_config,#BaseModel#Any#Any#Any#,33

Before Change



    def get_from_config(self, variable, default=None, config=None):
         Return a variable from config or a default value 
        if "/" in variable:
            var = variable.split("/")
            prefix = var[:-1]
            var_name = var[-1]
        else:
            prefix = []
            var_name = variable

        config = config or self.config
        for p in prefix:
            if p in config:
                config = config[p]

After Change


    def get_from_config(self, variable, default=None, config=None):
         Return a variable from config or a default value 
        config = config or self.config
        try:
            value = self.get(variable, config)
        except KeyError:
            return default
        return value

    def _make_inputs(self, names=None):
         Make model input data using config
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: analysiscenter/batchflow
Commit Name: c472f856ac60d0fff63b90642d912d7e0db1c7dd
Time: 2017-11-16
Author: rhudor@gmail.com
File Name: dataset/models/base.py
Class Name: BaseModel
Method Name: get_from_config


Project Name: snorkel-team/snorkel
Commit Name: 0722cbb28234dfb6f38c375fed80d339e9921324
Time: 2017-08-14
Author: ajratner@gmail.com
File Name: snorkel/learning/utils.py
Class Name: GridSearch
Method Name: _fit_st


Project Name: taehoonlee/tensornets
Commit Name: 7e569f461b1638f3a7d0d2b825699745df876b68
Time: 2018-04-10
Author: me@taehoonlee.com
File Name: tensornets/pretrained.py
Class Name:
Method Name: direct