(self)
| 131 | |
| 132 | @rank_zero_only |
| 133 | def save_code_snapshot(self): |
| 134 | os.makedirs(self.savedir, exist_ok=True) |
| 135 | for f in self.get_file_list(): |
| 136 | if not os.path.exists(f) or os.path.isdir(f): |
| 137 | continue |
| 138 | os.makedirs(os.path.join(self.savedir, os.path.dirname(f)), exist_ok=True) |
| 139 | shutil.copyfile(f, os.path.join(self.savedir, f)) |
| 140 | |
| 141 | def on_fit_start(self, trainer, pl_module): |
| 142 | try: |
no test coverage detected