(self, model, log_dir, epoch)
| 155 | #self.save_checkpoint(model, log_dir, epoch) |
| 156 | |
| 157 | def save_checkpoint(self, model, log_dir, epoch): |
| 158 | filepath = os.path.join(log_dir, f"{epoch}_checkpoint.pt") |
| 159 | if self.saving_checkpoint and not os.path.exists(filepath): |
| 160 | print(f"Saving model") |
| 161 | torch.save(model.state_dict(), filepath) |
| 162 | |
| 163 | def _update_loss_scores(self, loss_score, eval_loss, epoch): |
| 164 | self.eval_loss_min = eval_loss |
nothing calls this directly
no outgoing calls
no test coverage detected