Skip to content

Commit

Permalink
Create single file in TensorBoardLogger (#777)
Browse files Browse the repository at this point in the history
* write to single file

* fix import
  • Loading branch information
festeh committed Feb 2, 2020
1 parent 472f394 commit b5cab7e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pytorch_lightning/loggers/tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,12 @@ def log_hyperparams(self, params):
" hyperparameter logging."
)
else:
# `add_hparams` requires both - hparams and metric
self.experiment.add_hparams(hparam_dict=params, metric_dict={})
from torch.utils.tensorboard.summary import hparams
exp, ssi, sei = hparams(params, {})
writer = self.experiment._get_file_writer()
writer.add_summary(exp)
writer.add_summary(ssi)
writer.add_summary(sei)
# some alternative should be added
self.tags.update(params)

Expand Down

0 comments on commit b5cab7e

Please sign in to comment.