diff --git a/ppdet/utils/cli.py b/ppdet/utils/cli.py index 665a29254a575b477554cbfc91a9259b8d93d2fb..285918cf5694822be052a6d1e28a796203c03e33 100644 --- a/ppdet/utils/cli.py +++ b/ppdet/utils/cli.py @@ -68,7 +68,8 @@ class ArgsParser(ArgumentParser): 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: