MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / load_opt_from_config_files

Function load_opt_from_config_files

utils/arguments.py:47–64  ·  view source on GitHub ↗

Load opt from the config files, settings in later files can override those in previous files. Args: conf_files (list): a list of config file paths Returns: dict: a dictionary of opt settings

(conf_files)

Source from the content-addressed store, hash-verified

45 return opt
46
47def load_opt_from_config_files(conf_files):
48 """
49 Load opt from the config files, settings in later files can override those in previous files.
50
51 Args:
52 conf_files (list): a list of config file paths
53
54 Returns:
55 dict: a dictionary of opt settings
56 """
57 opt = {}
58 for conf_file in conf_files:
59 with open(conf_file, encoding='utf-8') as f:
60 config_dict = yaml.safe_load(f)
61
62 load_config_dict_to_opt(opt, config_dict)
63
64 return opt
65
66
67def load_opt_command(args):

Callers 1

load_opt_commandFunction · 0.85

Calls 1

load_config_dict_to_optFunction · 0.85

Tested by

no test coverage detected