TensorBoardLogger.jl icon indicating copy to clipboard operation
TensorBoardLogger.jl copied to clipboard

do-notation API for logging everything in one step

Open ToucheSir opened this issue 5 years ago • 2 comments
trafficstars

Following #8 and #9, would it be feasible to integrate an API along the lines of:

...
with_logger(lg) do
    for i=1:100
        # increments log_step_increment by one by default
        # could also take a custom increment as an optional parameter
        with_step() do
            @info "test" i=i        
        end
    end
end

For use-cases where one only wants to increment the step once per iteration (e.g. to match tensorflow's behaviour), this would eliminate the need to specify log_step_increment=0 on the remaining N-1 logging calls.

ToucheSir avatar Aug 07 '20 17:08 ToucheSir

@ToucheSir Great idea! I've implemented it in the above PR. Would be great if you can review it. (Shameless plug - please review my other PR's :pray: )

nomadbl avatar Jul 05 '23 14:07 nomadbl

I'm not a maintainer of this repo and I haven't used this package for a while, but will look at the PR. A better bet for you will be to get some contributor attention instead

ToucheSir avatar Jul 05 '23 14:07 ToucheSir