Summaries are complicated objects because they reflect the Protobuf object structure that are serialized in the tfevents records files. This function allows one to easily query vaues from summaries and will dispatch to the correct way to extract images, audio, text, etc from summary values.
Examples
temp <- tempfile()
with_logdir(temp, {
for(i in 1:5) {
log_event(my_log = runif(1))
}
})
# iterate over all events
summary <- collect_events(temp, n = 1, type = "summary")
value(summary$summary)
#> [1] 0.226317