We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c461790 commit 267ec3cCopy full SHA for 267ec3c
ml3d/utils/config.py
@@ -170,15 +170,15 @@ def _merge_a_into_b(a, b):
170
# from mmcv mmcv/utils/config.py
171
b = b.copy()
172
for k, v in a.items():
173
- if isinstance(v, dict) and k in b:
174
- if not isinstance(b[k], dict):
+ if isinstance(v, dict):
+ if k in b and not isinstance(b[k], dict):
175
raise TypeError(
176
"{}={} in child config cannot inherit from base ".
177
format(k, v) +
178
"because {} is a dict in the child config but is of ".
179
format(k) +
180
"type {} in base config. ".format(type(b[k])))
181
- b[k] = Config._merge_a_into_b(v, b[k])
+ b[k] = Config._merge_a_into_b(v, b.get(k, ConfigDict()))
182
else:
183
if v is None:
184
continue
0 commit comments