Create the folders to store codes, checkpoints, etc.
(self, root_dir: str, exp_tag: str, exp_tag_first: bool)
| 575 | return self.options |
| 576 | |
| 577 | def _create_folders(self, root_dir: str, exp_tag: str, exp_tag_first: bool): |
| 578 | """ |
| 579 | Create the folders to store codes, checkpoints, etc. |
| 580 | """ |
| 581 | |
| 582 | dir_dict = dict() |
| 583 | for dir_name in [ |
| 584 | "checkpoint", |
| 585 | "tensorboard", |
| 586 | "logs", |
| 587 | "plots", |
| 588 | "code", |
| 589 | "option", |
| 590 | ]: |
| 591 | if exp_tag_first: |
| 592 | dir_dict[dir_name] = os.path.join(root_dir, exp_tag, dir_name) |
| 593 | else: |
| 594 | dir_dict[dir_name] = os.path.join(root_dir, dir_name, exp_tag) |
| 595 | os.makedirs(dir_dict[dir_name], exist_ok=True) |
| 596 | |
| 597 | return dir_dict |
| 598 | |
| 599 | @staticmethod |
| 600 | def _determine_device(process_info: T.Dict[str, T.Any]): |