-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert(MVHistory, logger)
fails if hyperparameters have been recorded
#137
Comments
This seems like the offending TensorBoardLogger.tensorboard.Summary(TensorBoardLogger.tensorboard.var"Summary.Value"[TensorBoardLogger.tensorboard.var"Summary.Value"("", "_hparams_/experiment", TensorBoardLogger.tensorboard.SummaryMetadata(TensorBoardLogger.tensorboard.var"SummaryMetadata.PluginData"("hparams", UInt8[0x12, 0x30, 0x19, 0x5b, 0x9a, 0x61, 0x3f, 0x2a, 0x42, 0xd9 … 0x09, 0x0a, 0x07, 0x12, 0x05, 0x78, 0x2f, 0x76, 0x61, 0x6c]), "", "", TensorBoardLogger.tensorboard.DataClass.DATA_CLASS_UNKNOWN), nothing)]) I got this from inserting print statements here: TensorBoardLogger.jl/src/Deserialization/deserialization.jl Lines 244 to 258 in 3d9c1a5
|
So that will be coming from TensorBoardLogger.jl/src/hparams.jl Lines 152 to 154 in 3d9c1a5
|
One fix that works nicely on my end (though it's unclear to me if this is undesirable or not) is to simply skip a function Base.iterate(iter::SummaryDeserializingIterator, state=1)
evs = iter.summary
res = iterate(evs, state)
res isa Nothing && return nothing
(tag, summary), i_state = res
typ = summary_type(summary)
if typ === :histo
val = deserialize_histogram_summary(summary)
tag, val, state = lookahead_deserialize(tag, val, evs, state, :histo)
elseif typ === :image
val = deserialize_image_summary(summary)
tag, val, state = lookahead_deserialize(tag, val, evs, state, :image)
elseif typ === :audio
val = deserialize_audio_summary(summary)
elseif typ === :tensor
val = deserialize_tensor_summary(summary)
elseif typ === :simple_value
val = summary.value
tag, val, state = lookahead_deserialize(tag, val, evs, state, :simple_value)
else
@error "Event with unknown field" summary=summary
end
return (tag, val), state + 1
end can be replaced by function Base.iterate(iter::SummaryDeserializingIterator, state=1)
evs = iter.summary
res = iterate(evs, state)
res isa Nothing && return nothing
(tag, summary), i_state = res
# THIS IS THE CHANGE
if summary.value === nothing
return iterate(iter, i_state)
end
typ = summary_type(summary)
if typ === :histo
val = deserialize_histogram_summary(summary)
tag, val, state = lookahead_deserialize(tag, val, evs, state, :histo)
elseif typ === :image
val = deserialize_image_summary(summary)
tag, val, state = lookahead_deserialize(tag, val, evs, state, :image)
elseif typ === :audio
val = deserialize_audio_summary(summary)
elseif typ === :tensor
val = deserialize_tensor_summary(summary)
elseif typ === :simple_value
val = summary.value
tag, val, state = lookahead_deserialize(tag, val, evs, state, :simple_value)
else
@error "Event with unknown field" summary=summary
end
return (tag, val), state + 1
end |
MWE:
In contrast, the following works:
System info
The text was updated successfully, but these errors were encountered: