Parse option file. Args: opt_path (str): Option file path. is_train (str): Indicate whether in training or not. Default: True. Returns: (dict): Options.
(opt_path)
| 31 | |
| 32 | |
| 33 | def parse(opt_path): |
| 34 | """Parse option file. |
| 35 | Args: |
| 36 | opt_path (str): Option file path. |
| 37 | is_train (str): Indicate whether in training or not. Default: True. |
| 38 | Returns: |
| 39 | (dict): Options. |
| 40 | """ |
| 41 | with open(opt_path, mode="r") as f: |
| 42 | Loader, _ = ordered_yaml() |
| 43 | opt = yaml.load(f, Loader=Loader) |
| 44 | return opt |
| 45 | |
| 46 | |
| 47 | def dict2str(opt, indent_level=1): |
no test coverage detected