Skip to content

Commit 1886f86

Browse files
tullieBorda
authored andcommitted
Remove explicit flush from tensorboard logger (#2126)
* Remove explicit flush from tensorboard logger * Update changelog (cherry picked from commit 6537642)
1 parent 3f28a8e commit 1886f86

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
88

99
### Added
1010

11+
- Remove explicit flush from tensorboard logger ([#2126] https://github.com/PyTorchLightning/pytorch-lightning/pull/2126)
12+
1113
- Add Metric Base Classes ([#1326](https://github.com/PyTorchLightning/pytorch-lightning/pull/1326), [#1877](https://github.com/PyTorchLightning/pytorch-lightning/pull/1877))
1214

1315
- 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))

pytorch_lightning/loggers/tensorboard.py

-6
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,6 @@ def log_metrics(self, metrics: Dict[str, float], step: Optional[int] = None) ->
144144
@rank_zero_only
145145
def save(self) -> None:
146146
super().save()
147-
try:
148-
self.experiment.flush()
149-
except AttributeError:
150-
# you are using PT version (<v1.2) which does not have implemented flush
151-
self.experiment._get_file_writer().flush()
152-
153147
dir_path = self.log_dir
154148
if not os.path.isdir(dir_path):
155149
dir_path = self.save_dir

0 commit comments

Comments
 (0)