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 events_logdir().

n

The maximum number of events to read from the connection. If NULL then all events are read, the default is NULL.

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

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.3 Index]