b7e8d7d7fb49ae7a66fce7e6ee1f0cbaf561e7d6,mmcv/utils/registry.py,,build_from_cfg,#Any#Any#Any#,88
Before Change
if is_str(obj_type):
obj_cls = registry.get(obj_type)
if obj_cls is None:
raise KeyError("{} is not in the {} registry".format(
obj_type, registry.name))
elif inspect.isclass(obj_type):
obj_cls = obj_type
else:
raise TypeError("type must be a str or valid type, but got {}".format(
After Change
raise TypeError("registry must be an mmcv.Registry object, "
f"but got {type(registry)}")
if not (isinstance(default_args, dict) or default_args is None):
raise TypeError("default_args must be a dict or None, "
f"but got {type(default_args)}")
args = cfg.copy()
obj_type = args.pop("type")
if is_str(obj_type):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: open-mmlab/mmcv
Commit Name: b7e8d7d7fb49ae7a66fce7e6ee1f0cbaf561e7d6
Time: 2020-04-25
Author: yhcao6@gmail.com
File Name: mmcv/utils/registry.py
Class Name:
Method Name: build_from_cfg
Project Name: open-mmlab/mmcv
Commit Name: b7e8d7d7fb49ae7a66fce7e6ee1f0cbaf561e7d6
Time: 2020-04-25
Author: yhcao6@gmail.com
File Name: mmcv/utils/registry.py
Class Name: Registry
Method Name: _register_module
Project Name: pymc-devs/pymc3
Commit Name: 1c30a6f487afaeef73464a98320e35961b11873f
Time: 2019-12-09
Author: aloctavodia@gmail.com
File Name: pymc3/variational/inference.py
Class Name:
Method Name: fit