Remove explicit flush from tensorboard logger (#2126)

* Remove explicit flush from tensorboard logger

* Update changelog
This commit is contained in:
Tullie Murrell 2020-06-09 07:08:12 -04:00 committed by GitHub
parent 3f28a8ef32
commit 6537642f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Added
- Remove explicit flush from tensorboard logger ([#2126] https://github.com/PyTorchLightning/pytorch-lightning/pull/2126)
- Add Metric Base Classes ([#1326](https://github.com/PyTorchLightning/pytorch-lightning/pull/1326), [#1877](https://github.com/PyTorchLightning/pytorch-lightning/pull/1877))
- Added type hints in `Trainer.fit()` and `Trainer.test()` to reflect that also a list of dataloaders can be passed in ([#1723](https://github.com/PyTorchLightning/pytorch-lightning/pull/1723))

View File

@ -144,12 +144,6 @@ class TensorBoardLogger(LightningLoggerBase):
@rank_zero_only
def save(self) -> None:
super().save()
try:
self.experiment.flush()
except AttributeError:
# you are using PT version (<v1.2) which does not have implemented flush
self.experiment._get_file_writer().flush()
dir_path = self.log_dir
if not os.path.isdir(dir_path):
dir_path = self.save_dir