Tensorboard Docu about Hyperparams saving (#5158)

* Add documentation to tensorboard

* Remove unnecessary whitespaces

* Update pytorch_lightning/loggers/tensorboard.py

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>

* Add metrics to tensorboard logger

* Whitespace removed

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
This commit is contained in:
Skyy93 2021-01-15 06:28:58 +01:00 committed by Jirka Borovec
parent 43e926b880
commit a375240c0c
1 changed files with 15 additions and 2 deletions

View File

@ -144,8 +144,21 @@ class TensorBoardLogger(LightningLoggerBase):
return self._experiment
@rank_zero_only
def log_hyperparams(self, params: Union[Dict[str, Any], Namespace],
metrics: Optional[Dict[str, Any]] = None) -> None:
def log_hyperparams(
self,
params: Union[Dict[str, Any], Namespace],
metrics: Optional[Dict[str, Any]] = None,
) -> None:
"""
Record hyperparameters. TensorBoard logs with and without saved hyperparameters
are incompatible, the hyperparameters are then not displayed in the TensorBoard.
Please delete or move the previously saved logs to display the new ones with hyperparameters.
Args:
params: a dictionary-like container with the hyperparameters
metrics: Dictionary with metric names as keys and measured quantities as values
"""
params = self._convert_params(params)
# store params to output