(args: argparse.Namespace)
| 395 | |
| 396 | @beartype |
| 397 | def dump_config(args: argparse.Namespace) -> None: |
| 398 | config_file = Path(args.result_dir) / "config.json" |
| 399 | if not config_file.exists(): |
| 400 | with open(config_file, "w") as f: |
| 401 | json.dump(vars(args), f, indent=4) |
| 402 | logger.info(f"Dump config to {config_file}") |
| 403 | |
| 404 | |
| 405 | if __name__ == "__main__": |