Load config from yml/yaml file. Args: file_path (str): Path of the config file to be loaded. Returns: global config
(file_path)
| 73 | |
| 74 | |
| 75 | def load_config(file_path): |
| 76 | """ |
| 77 | Load config from yml/yaml file. |
| 78 | Args: |
| 79 | file_path (str): Path of the config file to be loaded. |
| 80 | Returns: global config |
| 81 | """ |
| 82 | _, ext = os.path.splitext(file_path) |
| 83 | assert ext in [".yml", ".yaml"], "only support yaml files for now" |
| 84 | config = yaml.load(open(file_path, "rb"), Loader=yaml.SafeLoader) |
| 85 | return config |
| 86 | |
| 87 | |
| 88 | def merge_config(config, opts): |
no outgoing calls
no test coverage detected
searching dependent graphs…