- class netket.logging.TensorBoardLog#
Creates a tensorboard logger using tensorboardX’s summarywriter. Refer to its documentation for further details
TensorBoardX must be installed.
string) – Save directory location. Default is runs/CURRENT_DATETIME_HOSTNAME, which changes after each run. Use hierarchical folder structure to compare between runs easily. e.g. pass in ‘runs/exp1’, ‘runs/exp2’, etc. for each new experiment to compare across them.
string) – Comment logdir suffix appended to the default
logdiris assigned, this argument has no effect.
int) – When logging crashes at step \(T+X\) and restarts at step \(T\), any events whose global_step larger or equal to \(T\) will be purged and hidden from TensorBoard. Note that crashed and resumed experiments should have the same
int) – Size of the queue for pending events and summaries before one of the ‘add’ calls forces a flush to disk. Default is ten items.
int) – How often, in seconds, to flush the pending events and summaries to disk. Default is every two minutes.
string) – Suffix added to all event filenames in the logdir directory. More details on filename construction in tensorboard.summary.writer.event_file_writer.EventFileWriter.
boolean) – If pass False, TensorBoardLog will not write to disk.
Logging optimisation to tensorboard.
>>> import pytest; pytest.skip("skip automated test of this docstring") >>> >>> import netket as nk >>> # create a summary writer with automatically generated folder name. >>> writer = nk.logging.TensorBoardLog() >>> # folder location: runs/May04_22-14-54_s-MacBook-Pro.local/ >>> # create a summary writer using the specified folder name. >>> writer = nk.logging.TensorBoardLog("my_experiment") >>> # folder location: my_experiment >>> # create a summary writer with comment appended. >>> writer = nk.logging.TensorBoardLog(comment="LR_0.1_BATCH_16") >>> # folder location: runs/May04_22-14-54_s-MacBook-Pro.localLR_0.1_BATCH_16/