| 55 | print("not found tf board") |
| 56 | |
| 57 | def saveRuntimeCode(dst: str) -> None: |
| 58 | additionalIgnorePatterns = ['.git', '.gitignore'] |
| 59 | ignorePatterns = set() |
| 60 | ROOT = '.' |
| 61 | with open(os.path.join(ROOT, '.gitignore')) as gitIgnoreFile: |
| 62 | for line in gitIgnoreFile: |
| 63 | if not line.startswith('#'): |
| 64 | if line.endswith('\n'): |
| 65 | line = line[:-1] |
| 66 | if line.endswith('/'): |
| 67 | line = line[:-1] |
| 68 | ignorePatterns.add(line) |
| 69 | ignorePatterns = list(ignorePatterns) |
| 70 | for additionalPattern in additionalIgnorePatterns: |
| 71 | ignorePatterns.append(additionalPattern) |
| 72 | |
| 73 | log_dir = Path(__file__).resolve().parent |
| 74 | |
| 75 | shutil.copytree(log_dir, dst, ignore=shutil.ignore_patterns(*ignorePatterns)) |
| 76 | |
| 77 | print('Backup Finished!') |
| 78 | |
| 79 | |
| 80 | def training(dataset, opt, pipe, dataset_name, testing_iterations, saving_iterations, checkpoint_iterations, checkpoint, debug_from, wandb=None, logger=None, ply_path=None): |