-
Notifications
You must be signed in to change notification settings - Fork 162
Open
Description
OpenSTL/openstl/utils/main_utils.py
Line 141 in b658dab
def update_config(args, config, exclude_keys=list()): |
def update_config(args, config, exclude_keys=list()):
"""update the args dict with a new config"""
assert isinstance(args, dict) and isinstance(config, dict)
for k in config.keys():
if args.get(k, False):
if args[k] != config[k] and k not in exclude_keys and args[k] is not None:
print(f'overwrite config key -- {k}: {config[k]} -> {args[k]}')
else: 《《《《《《《《《《《《 这里不修改存在吧
args[k] = config[k]
else:
args[k] = config[k]
return args
Metadata
Metadata
Assignees
Labels
No labels