INNER CODE UNIT · Python
parse_and_merge_options
nianticlabs/simplerecon · options.py:271
def parse_and_merge_options(self, config_filepaths=None, ignore_cl_args=False):
"""Parses flags from a config file and CL arguments.
Args:
config_filepaths: str filepath to a .yaml or list of filepaths
to config files ignore_cl_args: optionally ignore CLI
altogether, useful for debugging with a hardcoded config
filepath and in python notebooks.
Raises:
Exception: raised when required arguments aren't satisfied.
"""
# parse args
if not ignore_cl_args:
cl_args = self.parser.parse_args()
# load config file
if config_filepaths is not None:
# use config_filepath(s) provided here if available