Skip to content

Commit

Permalink
write to single file
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Lipin authored and festeh committed Feb 2, 2020
1 parent 472f394 commit fa50e1c
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 @@ -6,6 +6,7 @@
import torch
import csv
from torch.utils.tensorboard import SummaryWriter
from torch.utils.tensorboard.summary import hparams

from .base import LightningLoggerBase, rank_zero_only

Expand Down Expand Up @@ -84,8 +85,11 @@ def log_hyperparams(self, params):
" hyperparameter logging."
)
else:
# `add_hparams` requires both - hparams and metric
self.experiment.add_hparams(hparam_dict=params, metric_dict={})
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 fa50e1c

Please sign in to comment.