5ee3929ba2b721f73f4d6e9088b6c4dcba0141b7,deeppavlov/core/common/params.py,,from_params,#Any#Any#,9
Before Change
def from_params(cls: Type, params: Dict, **kwargs) -> Type:
signature_params = getfullargspec(cls.__init__).args[1:]
config_params = {}
for sp in signature_params:
try:
config_params[sp] = params[sp]
After Change
if sp != "name":
config_params[sp] = params[sp]
except KeyError:
print("Using default value for parameter `{}`.".format(sp) )
// Occurs when params[sp] throws KeyError. It means that the needed configuration is
// absent in the json file and a default configuration from class constructor should
// be taken instead.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: deepmipt/DeepPavlov
Commit Name: 5ee3929ba2b721f73f4d6e9088b6c4dcba0141b7
Time: 2017-12-13
Author: ol.gure@gmail.com
File Name: deeppavlov/core/common/params.py
Class Name:
Method Name: from_params
Project Name: deepmipt/DeepPavlov
Commit Name: d3a5ada29c4bfd963221fbb6e0750004bb0dd92a
Time: 2017-12-12
Author: mary.vikhreva@gmail.com
File Name: deeppavlov/common/params.py
Class Name:
Method Name: from_params
Project Name: deepmipt/DeepPavlov
Commit Name: 9e4d759bc80f48fde5ebd34d011895d51528e424
Time: 2017-12-18
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/core/common/params.py
Class Name:
Method Name: from_params