diff --git a/tests/loggers/test_tensorboard.py b/tests/loggers/test_tensorboard.py index 937a233c9a..4e5974b2b1 100644 --- a/tests/loggers/test_tensorboard.py +++ b/tests/loggers/test_tensorboard.py @@ -77,3 +77,19 @@ def test_tensorboard_log_hyperparams(tmpdir): "layer": torch.nn.BatchNorm1d } logger.log_hyperparams(hparams) + +def test_tensorboard_log_hparams_and_metrics + logger = TensorBoardLogger(tmpdir) + hparams = { + "float": 0.3, + "int": 1, + "string": "abc", + "bool": True, + "dict": {'a': {'b': 'c'}}, + "list": [1, 2, 3], + "namespace": Namespace(foo=Namespace(bar='buzz')), + "layer": torch.nn.BatchNorm1d + } + metrics = {'abc': torch.tensor([0.54])} + logger.log_hyperparams(hparams, metrics) +