Package

org.platanios.tensorflow.api.io

events

Permalink

package events

Visibility
  1. Public
  2. All

Type Members

  1. case class AudioEventRecord(wallTime: Double, step: Long, value: AudioValue) extends EventRecord[AudioValue] with Product with Serializable

    Permalink
  2. case class AudioValue(encodedAudio: ByteString, contentType: String, sampleRate: Float, numChannels: Long, lengthFrames: Long) extends Product with Serializable

    Permalink
  3. case class CompressedHistogramEventRecord(wallTime: Double, step: Long, value: Seq[HistogramValue]) extends EventRecord[Seq[HistogramValue]] with Product with Serializable

    Permalink
  4. case class EventAccumulator(path: Path, sizeGuidance: Map[EventType, Int] = ..., histogramCompressionBps: Seq[Int] = ..., purgeOrphanedData: Boolean = true) extends Product with Serializable

    Permalink

    Accumulates event values collected from the provided path.

    Accumulates event values collected from the provided path.

    The EventAccumulator is intended to provide a convenient interface for loading event data written during a TensorFlow run (or otherwise). TensorFlow writes out event ProtoBuf objects, which have a timestamp and step number associated with them, and often also contain a Summary. Summaries can store different kinds of data like a scalar value, an image, audio, or a histogram. Each summary also has a tag associated with it, which we use to organize logically related data. The EventAccumulator supports retrieving the event and summary data by their tags.

    Calling tags returns a map from event types to the associated tags for those types, that were found in the loaded event files. Then, various functional endpoints (e.g., scalars(tag)) allow for the retrieval of all data associated with each tag.

    The reload() method synchronously loads all of the data written so far.

    path

    Path to a directory containing TensorFlow events files, or a single TensorFlow events file. The accumulator will load events from this path.

    sizeGuidance

    Information on how much data the event accumulator should store in memory. The default size guidance tries not to store too much so as to avoid consuming all of the client's memory. The sizeGuidance should be a map from event types to integers representing the number of items to keep in memory, per tag for items of that event type. If the size is 0, then all events are stored. Images, audio, and histograms tend to be very large and thus storing all of them is not recommended.

    histogramCompressionBps

    Information on how the event accumulator should compress histogram data for the CompressedHistogramEventType event type.

    purgeOrphanedData

    Boolean value indicating whether to discard any events that were "orphaned" by a TensorFlow restart.

  5. class EventFileReader extends utilities.Closeable with Loader[Event]

    Permalink

    Event file reader.

    Event file reader.

    An event file reader is used to create iterators over the events stored in the file at the provided path (i.e., filePath).

    Note that this reader ignores any corrupted records at the end of the file. That is to allow for "live tracking" of summary files while they're being written to.

  6. class EventFileWriter extends AnyRef

    Permalink

    Writes Event protocol buffers to files.

    Writes Event protocol buffers to files.

    The EventFileWriter class creates an event file in the specified directory and asynchronously writes Event protocol buffers to it. The file is encoded using the TFRecord format, which is similar to RecordIO.

    On construction the event file writer creates a new event file in workingDir. This event file will contain Event protocol buffers, which are written to disk via the EventFileWriter.write() method.

  7. case class EventMultiplexer(initialRunPaths: Map[String, Path] = Map.empty[String, Path], sizeGuidance: Map[EventType, Int] = ..., histogramCompressionBps: Seq[Int] = ..., purgeOrphanedData: Boolean = true) extends Product with Serializable

    Permalink

    An EventMultiplexer manages access to multiple EventAccumulators.

    An EventMultiplexer manages access to multiple EventAccumulators.

    Each event accumulator is associated with a run, which is a self-contained execution. The event multiplexer provides methods for extracting information about events from multiple runs.

    Example usage for loading specific runs from files:

    val m = EventMultiplexer(Map("run1" -> Paths.get("path/to/run1"), "run2" -> Paths.get("path/to/run2")))
    m.reload()

    Example usage for loading a directory where each subdirectory corresponds to a run:

    // For example, assume the following directory structure:
    //   /parent/directory/path/
    //   /parent/directory/path/run1/
    //   /parent/directory/path/run1/events.out.tfevents.1001
    //   /parent/directory/path/run1/events.out.tfevents.1002
    //   /parent/directory/path/run2/
    //   /parent/directory/path/run2/events.out.tfevents.9232
    //   /parent/directory/path/run3/
    //   /parent/directory/path/run3/events.out.tfevents.9232
    val m1 = EventMultiplexer().addRunsFromDirectory("/parent/directory/path")
    // is equivalent to:
    val m2 = EventMultiplexer(Map("run1" -> Paths.get("/parent/directory/path/run1", ...)))
    initialRunPaths

    Optional map containing the initial run name to path mapping.

    sizeGuidance

    Information on how much data each event accumulator should store in memory. The default size guidance tries not to store too much so as to avoid consuming all of the client's memory. The sizeGuidance should be a map from event types to integers representing the number of items to keep in memory, per tag for items of that event type. If the size is 0, then all events are stored. Images, audio, and histograms tend to be very large and thus storing all of them is not recommended.

    histogramCompressionBps

    Information on how each event accumulator should compress histogram data for the CompressedHistogramEventType event type.

    purgeOrphanedData

    Boolean value indicating whether to discard any events that were "orphaned" by a TensorFlow restart.

  8. trait EventRecord[T] extends AnyRef

    Permalink

  9. sealed trait EventType extends AnyRef

    Permalink

  10. case class HistogramEventRecord(wallTime: Double, step: Long, value: HistogramValue) extends EventRecord[HistogramValue] with Product with Serializable

    Permalink
  11. case class HistogramValue(min: Double, max: Double, num: Double, sum: Double, sumSquares: Double, bucketLimits: Seq[Double], buckets: Seq[Double]) extends Product with Serializable

    Permalink
  12. case class ImageEventRecord(wallTime: Double, step: Long, value: ImageValue) extends EventRecord[ImageValue] with Product with Serializable

    Permalink
  13. case class ImageValue(encodedImage: ByteString, width: Int, height: Int, colorSpace: Int) extends Product with Serializable

    Permalink
  14. case class ScalarEventRecord(wallTime: Double, step: Long, value: Float) extends EventRecord[Float] with Product with Serializable

    Permalink
  15. class SummaryFileWriter extends EventFileWriter

    Permalink

    Writes Summary protocol buffers to event files for use with TensorBoard.

    Writes Summary protocol buffers to event files for use with TensorBoard.

    The SummaryFileWriter class provides a mechanism to create an event file in a given directory and add summaries and events to it. The class updates the file contents asynchronously. This allows a training program to call methods to add data to the file directly from the training loop, without slowing down training.

    On construction the summary writer creates a new event file in workingDir. This event file will contain Event protocol buffers constructed when you call one of the following functions: writeGraph(), writeSummary(), writeSessionLog(), or writeRunMetadata().

    If you pass a Graph to the constructor it is write to the event file, which is equivalent to calling writeGraph() later on.

    TensorBoard will pick up the graph from the file and display it graphically so you can interactively explore it. You will usually pass the graph from the session in which you launched it:

    // Create a graph.
    val graph = Graph()
    ...
    // Launch the graph in a session.
    val session = Session(graph)
    // Create a summary file writer and add the graph to the event file.
    val writer = SummaryWriter(workingDir, session.graph)
  16. case class TensorEventRecord(wallTime: Double, step: Long, value: TensorProto) extends EventRecord[TensorProto] with Product with Serializable

    Permalink

Value Members

  1. object AudioEventType extends EventType with Product with Serializable

    Permalink
  2. object CompressedHistogramEventType extends EventType with Product with Serializable

    Permalink
  3. object EventAccumulator extends Serializable

    Permalink
  4. object EventFileWriter

    Permalink
  5. object EventMultiplexer extends Serializable

    Permalink
  6. object EventPluginUtilities

    Permalink

    Contains utilities for managing event plugins (e.g., TensorBoard plugins).

  7. object GraphEventType extends EventType with Product with Serializable

    Permalink
  8. object HistogramEventType extends EventType with Product with Serializable

    Permalink
  9. object ImageEventType extends EventType with Product with Serializable

    Permalink
  10. object MetaGraphEventType extends EventType with Product with Serializable

    Permalink
  11. object RunMetadataEventType extends EventType with Product with Serializable

    Permalink
  12. object ScalarEventType extends EventType with Product with Serializable

    Permalink
  13. object SummaryFileWriter

    Permalink
  14. object SummaryFileWriterCache

    Permalink

    Cache for summary file writers, which caches one writer per directory.

  15. object TensorEventType extends EventType with Product with Serializable

    Permalink

Ungrouped