Skip to content

Commit

Permalink
Fix a bug in command line option parsing (#2841)
Browse files Browse the repository at this point in the history
option should not be overridden by subsequent options of the same module
  • Loading branch information
willthefrog authored and qingqing01 committed Jul 26, 2019
1 parent c755cdf commit b0783c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PaddleCV/PaddleDetection/ppdet/utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def _parse_opt(self, opts):
config[k] = yaml.load(v, Loader=yaml.Loader)
else:
keys = k.split('.')
config[keys[0]] = {}
if keys[0] not in config:
config[keys[0]] = {}
cur = config[keys[0]]
for idx, key in enumerate(keys[1:]):
if idx == len(keys) - 2:
Expand Down

0 comments on commit b0783c7

Please sign in to comment.