(args: argparse.Namespace)
| 300 | |
| 301 | @beartype |
| 302 | def dump_config(args: argparse.Namespace) -> None: |
| 303 | config_file = Path(args.result_dir) / "config.json" |
| 304 | if not config_file.exists(): |
| 305 | with open(config_file, "w") as f: |
| 306 | json.dump(vars(args), f, indent=4) |
| 307 | logger.info(f"Dump config to {config_file}") |
| 308 | |
| 309 | |
| 310 | if __name__ == "__main__": |