JuliaLogging / TensorBoardLogger.jl

Easy peasy logging to TensorBoard with Julia
MIT License
103 stars 28 forks source link

log_value sets step to nothing on default #71

Open wattik opened 4 years ago

wattik commented 4 years ago

https://github.com/PhilipVinc/TensorBoardLogger.jl/blob/08f57d854ca1b32cc4cfb0a24881d57ec9f5bb1c/src/Loggers/LogValue.jl#L8

Hello, in contrary to the description and probably the expected behavior, the method log_value sets the argument step to nothing on default. As suggested in the description, a more natural default value for the argument would be step(logger). I believe this was intended but somehow accidentally omitted during development.

Cheers,

PhilipVinc commented 4 years ago

Hi wattik,

While step is set to nothing instead of the current step, the behaviour is what is documented, as later on in the serialisation chains nothing gets converted to step(logger). See https://github.com/PhilipVinc/TensorBoardLogger.jl/blob/08f57d854ca1b32cc4cfb0a24881d57ec9f5bb1c/src/event.jl#L10

Indeed our implementation is weird, the code should be cleaned up and the conversion should be moved up to improve the code quality. I have very little time those days, but if you want to pick this up, I'll be fast in reviewing.