gene-hoi-denoising / common /args_utils.py
meow
init
d6d3a5b
raw
history blame
409 Bytes
from loguru import logger
def set_default_params(args, default_args):
# if a val is not set on argparse, use default val
# else, use the one in the argparse
custom_dict = {}
for key, val in args.items():
if val is None:
args[key] = default_args[key]
else:
custom_dict[key] = val
logger.info(f"Using custom values: {custom_dict}")
return args