You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this expected? Are summary objects meant to return themselves when subsetted?
summaries$summary[[1]][[1]][[1]][[1]][[1]]
Would it be possible to make as.list() return the values as R objects directly?
as.list(summaries$summary) # instead of sapply(,value)`
Is there anything else a user would do with a <tfevents_summary_values> other than extract the value? Maybe we don't need expose the protobuf structure and value() function and can just return R values to the user. E.g., collect_events() returns a data frame with a list column, each entry an atomic R vector, maybe with different class()'s for the different plugin types like structure(c(...), class = "tfevents_image", dim = c(128,3,3). What do you think?
Fixed the error, it was actually a bug in the format implementation for tfevents_events.
Summaries are lists of summary_values vectors (as a summary can potentially contain many summary_values). The summary_values are vctrs, and they behave like R atomic vectors, ie subsetting them with [[ returns a new vector with that element. Accessing individual fields can be done with vctrs::field()
Yes, will implement as.list()
I taught about that but there are a few points:
There might be significant computation when casting from protobuf to an R object. Eg, Images are stored as binary PNG blobs and casting them to R objects requires us to read them with png::readPNG(). Same for audio files, etc.
Since plugin metadata could be arbitrary data, I think it's important to expose it entirely.
Some minor notes:
as.list()
return the values as R objects directly?<tfevents_summary_values>
other than extract the value? Maybe we don't need expose the protobuf structure andvalue()
function and can just return R values to the user. E.g.,collect_events()
returns a data frame with a list column, each entry an atomic R vector, maybe with differentclass()
's for the different plugin types likestructure(c(...), class = "tfevents_image", dim = c(128,3,3)
. What do you think?This is great!
Originally posted by @t-kalinowski in #27 (comment)
The text was updated successfully, but these errors were encountered: