Contents
ikkuna.visualization¶
Module contents¶
-
class
ikkuna.visualization.TBBackend(**kwargs)[source]¶ Bases:
ikkuna.visualization.backend.BackendTensorboard backend.
Note
Whitespace and punctuation in the
titlewill be replaced with underscores due to the fact that it becomes part of a file name.-
_writer¶ Type: tensorboardX.SummaryWriter
-
info= 'n/a'¶
-
add_data(module_name, datum, step)[source]¶ Display scalar data (i.e. a line plot)
Parameters: - module_name (str) – Name of module which emitted the data
- datum (torch.Tensor) – Payload
- step (int) – Global step
-
add_histogram(module_name, datum, step, bins='auto')[source]¶ Display histogram data (i.e. a line plot)
Parameters: - module_name (str) – Name of module which emitted the data
- datum (torch.Tensor) – Payload, not the histogram itself
- step (int) – Global step
-
-
class
ikkuna.visualization.MPLBackend(**kwargs)[source]¶ Bases:
ikkuna.visualization.backend.BackendMatplotlib backend (use in Jupyter with
%matplotlib inlineor via X-forwarding over ssh [barely useable])-
title¶
-
xlabel¶
-
ylabel¶
-
_reflow_plots()[source]¶ Reqorganize the histogram subplots into a rectangular shape. For now, the sublots are arranged on a grid twice as high as it is wide, since vertical space is often in abundance.
Note
This does not recompute the plots
-
add_histogram(module_name, datum, step)[source]¶ Display histogram data (i.e. a line plot)
Parameters: - module_name (str) – Name of module which emitted the data
- datum (torch.Tensor) – Payload, not the histogram itself
- step (int) – Global step
-
add_data(module_name, datum, step)[source]¶ Display scalar data (i.e. a line plot)
Parameters: - module_name (str) – Name of module which emitted the data
- datum (torch.Tensor) – Payload
- step (int) – Global step
-
-
class
ikkuna.visualization.Backend(title)[source]¶ Bases:
abc.ABCBase class for visualiation backends.
Subscribers use this class to dispatch their metrics to have them visualised.-
add_data(module_name, datum, step)[source]¶ Display scalar data (i.e. a line plot)
Parameters: - module_name (str) – Name of module which emitted the data
- datum (torch.Tensor) – Payload
- step (int) – Global step
-
add_histogram(module_name, datum, step)[source]¶ Display histogram data (i.e. a line plot)
Parameters: - module_name (str) – Name of module which emitted the data
- datum (torch.Tensor) – Payload, not the histogram itself
- step (int) – Global step
-
title
-
-
ikkuna.visualization.configure_prefix(p)[source]¶ Set a prefix to the log directory for Tensorboard.
Parameters: p (str) – Prefix to the directory name. _runswill be appended byTBBackend
-
class
ikkuna.visualization.NullBackend(*args, **kwargs)[source]¶ Bases:
ikkuna.visualization.backend.Backend-
add_data(*args, **kwargs)[source]¶ Display scalar data (i.e. a line plot)
Parameters: - module_name (str) – Name of module which emitted the data
- datum (torch.Tensor) – Payload
- step (int) – Global step
-
add_histogram(*args, **kwargs)[source]¶ Display histogram data (i.e. a line plot)
Parameters: - module_name (str) – Name of module which emitted the data
- datum (torch.Tensor) – Payload, not the histogram itself
- step (int) – Global step
-