read_tensorboard_hparams

read_tensorboard_hparams(logdir)

Read a hyperparameter sweep as its parallel coordinates and scatter matrix.

Parameters

Name Type Description Default
logdir str or os.PathLike The directory TensorBoard would be started with (--logdir). required

Returns

Name Type Description
list of TensorBoardChart Two charts, both tagged "hparams", whose runs are the sessions: first the parallel coordinates plot, one line per session across an axis for each hyperparameter and then each metric; then the scatter plot matrix, a row per metric and a column per hyperparameter. Empty, with a warning, when the directory holds no sweep.

Raises

Name Type Description
FileNotFoundError If logdir is not a directory.

Notes

Each axis of the parallel coordinates plot is pitched on its own scale, as it is drawn. A hyperparameter whose values are strings or bools is placed by the position of its value among the values the sweep tried, in sorted order, and the axis says which position is which, such as optimizer (0 adam, 1 sgd).

Examples

>>> import maidr
>>> parallel, matrix = maidr.read_tensorboard_hparams("logs/hparam_tuning")
>>> maidr.show(parallel)