MCPcopy
hub / github.com/open-mmlab/OpenPCDet / merge_new_config

Function merge_new_config

pcdet/config.py:51–68  ·  view source on GitHub ↗
(config, new_config)

Source from the content-addressed store, hash-verified

49
50
51def merge_new_config(config, new_config):
52 if '_BASE_CONFIG_' in new_config:
53 with open(new_config['_BASE_CONFIG_'], 'r') as f:
54 try:
55 yaml_config = yaml.safe_load(f, Loader=yaml.FullLoader)
56 except:
57 yaml_config = yaml.safe_load(f)
58 config.update(EasyDict(yaml_config))
59
60 for key, val in new_config.items():
61 if not isinstance(val, dict):
62 config[key] = val
63 continue
64 if key not in config:
65 config[key] = EasyDict()
66 merge_new_config(config[key], val)
67
68 return config
69
70
71def cfg_from_yaml_file(cfg_file, config):

Callers 1

cfg_from_yaml_fileFunction · 0.85

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected