Load a YAML config file and return a dict.
(config_path)
| 99 | |
| 100 | |
| 101 | def load_config(config_path): |
| 102 | """Load a YAML config file and return a dict.""" |
| 103 | import yaml |
| 104 | with open(config_path, 'r') as f: |
| 105 | cfg = yaml.safe_load(f) |
| 106 | return cfg or {} |
| 107 | |
| 108 | |
| 109 | def merge_config_and_args(cfg, args, parser): |