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

Tensorboard cant read event files that were created with ProtoBuf v0.7

Open nrxszvo opened this issue 6 years ago • 2 comments
trafficstars

After updating from ProtoBuf v0.6.1 to v0.7, tensorboard reports no data found in my logging directory. Reverting to ProtoBuf v0.6.1 fixes the problem.

Julia TensorFlow v0.10.4 Tensorboard v1.10 (also repro'd with v1.12)

My logging code:

mutable struct TBWriter <: AbstractTrainingLogger
    writer::TensorFlow.summary.FileWriter
end
            
function make_tb_writer(logdir::AbstractString="tb_logs")
    mkpath(logdir)
    writer = TensorFlow.summary.FileWriter(logdir)
    TBWriter(writer)
end

function log_scalar_to_tb(tbw::TBWriter, name::AbstractString, value::Number, step::Int)
    sv = TensorFlow.tensorflow.Summary_Value(tag=name, simple_value=value)
    s = TensorFlow.tensorflow.Summary(value=[sv])
    write(tbw.writer, s, step)
end

nrxszvo avatar Jan 15 '19 01:01 nrxszvo

It would help if you could share some minimal datafile/code to reproduce this error?

tanmaykm avatar Jan 23 '19 15:01 tanmaykm

Sure, using the functions defined above:

julia> using Pkg
julia> Pkg.add("TensorFlow")
julia> writer = make_tb_writer("repro")
julia> log_scalar_to_tb(writer, "test", 1, 1)

tensorboard --logdir repro

The webpage for the tensorboard session displays: screen shot 2019-01-23 at 7 59 44 pm

Then revert to ProtoBuf 0.6.1

julia> using Pkg
julia> Pkg.add(PackageSpec(name="ProtoBuf", version="0.6.1"))
julia> using TensorFlow
julia> writer = make_tb_writer("revert")
julia> log_scalar_to_tb(writer, "test", 1, 1)

tensorboard --logdir revert

The webpage for the tensorboard session displays: screen shot 2019-01-23 at 8 10 08 pm

Tensorboard event files here: tb_event_files.zip

nrxszvo avatar Jan 24 '19 04:01 nrxszvo

Please try to migrate to ProtoBuf.jl 1.0, older versions are not supported anymore.

Drvi avatar Aug 18 '22 09:08 Drvi