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

Function load_opt_from_config_file

utils/arguments.py:29–45  ·  view source on GitHub ↗

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

(conf_file)

Source from the content-addressed store, hash-verified

27 logger.warning(f"Overrided {k} from {ori_value} to {pointer[k_parts[-1]]}")
28
29def load_opt_from_config_file(conf_file):
30 """
31 Load opt from the config files, settings in later files can override those in previous files.
32
33 Args:
34 conf_files: config file path
35
36 Returns:
37 dict: a dictionary of opt settings
38 """
39 opt = {}
40 with open(conf_file, encoding='utf-8') as f:
41 config_dict = yaml.safe_load(f)
42
43 load_config_dict_to_opt(opt, config_dict)
44
45 return opt
46
47def load_opt_from_config_files(conf_files):
48 """

Callers 3

demo.pyFile · 0.90
build_semantic_samFunction · 0.90

Calls 1

load_config_dict_to_optFunction · 0.85

Tested by

no test coverage detected