    def close(self) -> None:
        """
        Calls the `close` method of the `SummaryWriter` s which makes sure that pending
        scalars are flushed to disk and the tensorboard event files are closed properly.
        """
        super().close()
        if self._train_log is not None:
            self._train_log.close()
        if self._validation_log is not None:
            self._validation_log.close()
Calls the `close` method of the `SummaryWriter` s which makes sure that pending
scalars are flushed to disk and the tensorboard event files are closed properly.
allennlp/training/callbacks/tensorboard.py