Skip to content

Commit

Permalink
close summary writer
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-eberts committed Feb 20, 2020
1 parent 8d70919 commit f70752b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spert/spert_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def train(self, train_path: str, valid_path: str, types_path: str, input_reader_

self._logger.info("Logged in: %s" % self._log_path)
self._logger.info("Saved in: %s" % self._save_path)
self._summary_writer.close()

def eval(self, dataset_path: str, types_path: str, input_reader_cls: BaseInputReader):
args = self.args
Expand Down Expand Up @@ -162,7 +163,9 @@ def eval(self, dataset_path: str, types_path: str, input_reader_cls: BaseInputRe

# evaluate
self._eval(model, input_reader.get_dataset(dataset_label), input_reader)

self._logger.info("Logged in: %s" % self._log_path)
self._summary_writer.close()

def _train_epoch(self, model: torch.nn.Module, compute_loss: Loss, optimizer: Optimizer, dataset: Dataset,
updates_epoch: int, epoch: int):
Expand Down

0 comments on commit f70752b

Please sign in to comment.