read_tensorboard_distributions
read_tensorboard_distributions(
logdir
*
tags=None
runs=None
max_points=DEFAULT_MAX_POINTS
)Read the distribution charts of a TensorBoard log directory.
One chart per tag and run, as TensorBoard’s Distributions dashboard draws them: the step along the x axis, and nine lines – the minimum, six percentiles, the median and the maximum of the logged values at each step – drawn over the nested bands between them.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| logdir | str or os.PathLike | The directory TensorBoard would be started with (--logdir). |
required |
| tags | iterable of str | Only these histogram tags, in this order. | None |
| runs | iterable of str | Only these runs. | None |
| max_points | int or None | At most this many steps per chart, evenly spaced and always keeping the first and last. None keeps every step. |
1000 |
Returns
| Name | Type | Description |
|---|---|---|
| list of TensorBoardChart | One per tag and run. |
Raises
| Name | Type | Description |
|---|---|---|
| FileNotFoundError | If logdir is not a directory. |
|
| ValueError | If max_points is below 2. |
Notes
The distributions are the histograms the Histograms dashboard reads, so whatever :func:maidr.read_tensorboard_histograms reads is read here. Each line is named for the share of values below it, such as 84.1%; a reader at one step moves Up and Down through them in value order, which is the spread of the distribution at that step, and Left and Right along one of them over training.
Examples
>>> import maidr
>>> for chart in maidr.read_tensorboard_distributions("logs/fit"):
... maidr.show(chart)