collect_events {tfevents} | R Documentation |
Collect data from tfevents records
Description
Collects all events of a kind in a single data.frame ready for analysis.
Usage
collect_events(
logdir = get_default_logdir(),
n = NULL,
type = c("any", "summary", "scalar")
)
events_logdir(logdir = get_default_logdir())
Arguments
logdir |
The log directory that you want to query events from. Either a
file path or a connection created with |
n |
The maximum number of events to read from the connection. If |
type |
The kind of events that are to be read. By default all events are read. If a different type is specified, then the result can include other columns as well as more lines. |
Value
A tibble
with the collected events.
Functions
-
events_logdir()
: Creates a connection to a logdir that can be reused to read further events later.
Examples
temp <- tempfile()
with_logdir(temp, {
for(i in 1:5) {
log_event(my_log = runif(1))
}
})
# collect all events in files, including file description events
collect_events(temp)
# collect summaries in the logdir
collect_events(temp, type = "summary")
# collect only scalar events
collect_events(temp, type = "scalar")
[Package tfevents version 0.0.4 Index]