Exported

TensorBoardLogger.TBLoggerType
TBLogger(logdir[, tb_increment]; 
        time=time(), 
        prefix="",
        purge_step=nothing, 
        step_increment=1, 
        min_level=Logging.Info)

Creates a TensorBoardLogger in the folder logdir. The second (optional) argument specifies the behaviour if the logdir already exhists: the default choice tb_increment appends an increasing number 1,2... to logdir. Other choices are tb_overwrite, which overwrites the previous folder, and tb_append, which adds to any existing logs.

Optional keyword argument prefix can be passed to prepend a path to the file name (note, not the log directory). See create_eventfile()

If a purge_step::Int is passed, every step before purge_step will be ignored by tensorboard (usefull in the case of restarting a crashed computation).

min_level specifies the minimum level of messages logged to tensorboard.

source
TensorBoardLogger.set_step!Function
set_step!(lg, step) -> Int

Sets the iteration counter in the logger to step. This counter is used by the logger when no value is passed by the user.

source
TensorBoardLogger.with_TBLogger_hold_stepFunction

with_TBLogger_hold_step(f, [step]; step_at_end::Bool=true) Context function to ease control of logging steps and synchronization. Amount of step increment can be controlled via set_step_increment!`.

Example:

with_logger(lg) do
    for epoch in 1:10
        for i=1:100
            # increments global_step by default
            with_TBLogger_hold_step() do
                # all of these are logged at the same global_step
                # and the logger global_step is only then increased
                @info "train1/scalar" i=i
                @info "train2/scalar" i2=i^2
                @info "train3/scalar" i3=i^3
            end
        end
        # step increment at end can be disabled for easy train/test sync
        with_TBLogger_hold_step(;step_at_end=false) do
            # all of these are logged at the same global_step
            # and the logger global_step is only then increased
            @info "test1/scalar" i=i
            @info "test2/scalar" i2=i^2
            @info "test3/scalar" i3=i^3
        end
    end
end
source
TensorBoardLogger.set_step_increment!Function
set_step_increment!(lg, increment) -> Int

Sets the default increment applyed to logger lg's iteration counter each time logging is performed.

Can be overidden by passing log_step_increment=some_increment when logging.

source