Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorboard Docu about Hyperparams saving #5158

Merged
merged 10 commits into from
Jan 15, 2021
17 changes: 15 additions & 2 deletions pytorch_lightning/loggers/tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,21 @@ def experiment(self) -> SummaryWriter:
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
Expand Down