public class LogFileWriter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LogFileWriter.EventSubtype |
static class |
LogFileWriter.StaticInfo |
| Constructor and Description |
|---|
LogFileWriter(File file) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
encodeGraphStructure(com.google.flatbuffers.FlatBufferBuilder fbb,
SameDiff sd) |
protected Pair<Integer,com.google.flatbuffers.FlatBufferBuilder> |
encodeStaticHeader(byte type)
Encode the header as a UIStaticInfoRecord instance for the specific
UIEventType |
List<Pair<UIEvent,com.google.flatbuffers.Table>> |
readEvents()
Read all of the events.
|
List<Pair<UIEvent,com.google.flatbuffers.Table>> |
readEvents(long startOffset)
Read all of the events starting at a specific file offset
|
LogFileWriter.StaticInfo |
readStatic()
Read all static information at the start of the file
|
boolean |
registeredEventName(String name) |
long |
registerEventName(String name)
Register the event name - "accuracy", "loss", etc for later use in recording events.
|
long |
registerEventNameQuiet(String name) |
long |
writeFinishStaticMarker()
Write marker for final static data
|
long |
writeGraphStructure(SameDiff sd)
Write the graph structure
|
long |
writeHistogramEventCustomBins(String name,
LogFileWriter.EventSubtype subtype,
long time,
int iteration,
int epoch,
INDArray bins,
INDArray y) |
long |
writeHistogramEventDiscrete(@NonNull String name,
LogFileWriter.EventSubtype subtype,
long time,
int iteration,
int epoch,
List<String> binLabels,
@NonNull INDArray y) |
long |
writeHistogramEventEqualSpacing(String name,
LogFileWriter.EventSubtype subtype,
long time,
int iteration,
int epoch,
double min,
double max,
INDArray y) |
long |
writeScalarEvent(String name,
LogFileWriter.EventSubtype subtype,
long time,
int iteration,
int epoch,
Number scalar)
Write a single scalar event to the file
|
public LogFileWriter(File file) throws IOException
IOExceptionpublic long writeGraphStructure(SameDiff sd) throws IOException
sd - SameDiff instance to write the graph structure forIOExceptionpublic long writeFinishStaticMarker()
throws IOException
IOExceptionpublic LogFileWriter.StaticInfo readStatic() throws IOException
IOExceptionpublic List<Pair<UIEvent,com.google.flatbuffers.Table>> readEvents() throws IOException
IOExceptionpublic List<Pair<UIEvent,com.google.flatbuffers.Table>> readEvents(long startOffset) throws IOException
IOExceptionpublic boolean registeredEventName(String name)
public long registerEventNameQuiet(String name)
public long registerEventName(String name) throws IOException
name - Name to registerIOExceptionpublic long writeScalarEvent(String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, Number scalar) throws IOException
name - Name of the event. Must be registered by registerEventName(String) first!time - Timestampiteration - Iteration for the eventepoch - Epoch for the eventscalar - Scalar value to writeIOExceptionpublic long writeHistogramEventDiscrete(@NonNull
@NonNull String name,
LogFileWriter.EventSubtype subtype,
long time,
int iteration,
int epoch,
List<String> binLabels,
@NonNull
@NonNull INDArray y)
throws IOException
IOExceptionpublic long writeHistogramEventEqualSpacing(String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, double min, double max, INDArray y) throws IOException
IOExceptionpublic long writeHistogramEventCustomBins(String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, INDArray bins, INDArray y) throws IOException
IOExceptionprotected Pair<Integer,com.google.flatbuffers.FlatBufferBuilder> encodeStaticHeader(byte type)
UIEventTypetype - UIEventTypeprotected int encodeGraphStructure(com.google.flatbuffers.FlatBufferBuilder fbb,
SameDiff sd)
Copyright © 2021. All rights reserved.