public class JavaStatsReport extends java.lang.Object implements StatsReport
Constructor and Description |
---|
JavaStatsReport() |
Modifier and Type | Method and Description |
---|---|
void |
decode(byte[] decode)
Decode the content of the given
byte array in to this persistable
|
void |
decode(java.nio.ByteBuffer buffer)
Decode from the given
ByteBuffer |
void |
decode(java.io.InputStream inputStream)
Decode from the given input stream
|
byte[] |
encode() |
void |
encode(java.nio.ByteBuffer buffer)
Encode this persistable in to a
ByteBuffer |
void |
encode(java.io.OutputStream outputStream)
Encode this persistable in to an output stream
|
int |
encodingLengthBytes()
Length of the encoding, in bytes, when using
Persistable.encode()
Length may be different using Persistable.encode(OutputStream) , due to things like stream headers |
java.util.List<java.io.Serializable> |
getDataSetMetaData()
Get the DataSet metadata, if any (null otherwise).
|
java.lang.String |
getDataSetMetaDataClassName()
Get the class
|
java.util.List<Pair<java.lang.String,int[]>> |
getGarbageCollectionStats()
Get the garbage collection stats: Pair contains GC name and the delta count/time values
|
java.util.Map<java.lang.String,Histogram> |
getHistograms(StatsType statsType)
Get the histograms for all parameters, for a given StatsType (Parameters/Updates/Activations)
|
java.util.Map<java.lang.String,java.lang.Double> |
getLearningRates()
Get the learning rates by parameter
|
java.util.Map<java.lang.String,java.lang.Double> |
getMean(StatsType statsType)
Get the mean values for each parameter for the given StatsType (Parameters/Updates/Activations)
|
java.util.Map<java.lang.String,java.lang.Double> |
getMeanMagnitudes(StatsType statsType)
Get the mean magnitude values for each parameter for the given StatsType (Parameters/Updates/Activations)
|
java.util.Map<java.lang.String,java.lang.Double> |
getStdev(StatsType statsType)
Get the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)
|
boolean |
hasDataSetMetaData()
Return whether any DataSet metadata is present or not
|
boolean |
hasGarbageCollection()
Return whether garbage collection information has been reported
|
boolean |
hasHistograms(StatsType statsType)
Return whether histograms have been reported, for the given stats type (Parameters, Updates, Activations)
|
boolean |
hasLearningRates()
Return whether the learning rates are present (have been reported)
|
boolean |
hasMemoryUse()
Return whether memory use has been reported
|
boolean |
hasPerformance()
Return whether performance stats (total time, total examples etc) have been reported
|
boolean |
hasScore()
Return whether the score is present (has been reported)
|
boolean |
hasSummaryStats(StatsType statsType,
SummaryType summaryType)
Return whether the summary stats (mean, standard deviation, mean magnitudes) have been reported for the
given stats type (Parameters, Updates, Activations)
|
void |
reportDataSetMetaData(java.util.List<java.io.Serializable> dataSetMetaData,
java.lang.Class<?> metaDataClass)
Report any metadata for the DataSet
|
void |
reportDataSetMetaData(java.util.List<java.io.Serializable> dataSetMetaData,
java.lang.String metaDataClass)
Report any metadata for the DataSet
|
void |
reportGarbageCollection(java.lang.String gcName,
int deltaGCCount,
int deltaGCTime)
Report Garbage collection stats
|
void |
reportHistograms(StatsType statsType,
java.util.Map<java.lang.String,Histogram> histogram)
Report histograms for all parameters, for a given
StatsType |
void |
reportIDs(java.lang.String sessionID,
java.lang.String typeID,
java.lang.String workerID,
long timeStamp) |
void |
reportIterationCount(int iterationCount)
Report the current iteration number
|
void |
reportLearningRates(java.util.Map<java.lang.String,java.lang.Double> learningRatesByParam)
Report the learning rates by parameter
|
void |
reportMean(StatsType statsType,
java.util.Map<java.lang.String,java.lang.Double> mean)
Report the mean values for each parameter, the given StatsType (Parameters/Updates/Activations)
|
void |
reportMeanMagnitudes(StatsType statsType,
java.util.Map<java.lang.String,java.lang.Double> meanMagnitudes)
Report the mean magnitude values for each parameter for the given StatsType (Parameters/Updates/Activations)
|
void |
reportMemoryUse(long jvmCurrentBytes,
long jvmMaxBytes,
long offHeapCurrentBytes,
long offHeapMaxBytes,
long[] deviceCurrentBytes,
long[] deviceMaxBytes)
Report the memory stats at this iteration
|
void |
reportPerformance(long totalRuntimeMs,
long totalExamples,
long totalMinibatches,
double examplesPerSecond,
double minibatchesPerSecond)
Report the performance stats (since the last report)
|
void |
reportScore(double currentScore)
Report model score at the current iteration
|
void |
reportStatsCollectionDurationMS(int statsCollectionDurationMS)
Report the number of milliseconds required to calculate all of the stats.
|
void |
reportStdev(StatsType statsType,
java.util.Map<java.lang.String,java.lang.Double> stdev)
Report the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDeviceCurrentBytes, getDeviceMaxBytes, getExamplesPerSecond, getIterationCount, getJvmCurrentBytes, getJvmMaxBytes, getMinibatchesPerSecond, getOffHeapCurrentBytes, getOffHeapMaxBytes, getScore, getStatsCollectionDurationMs, getTotalExamples, getTotalMinibatches, getTotalRuntimeMs
getSessionID, getTimeStamp, getTypeID, getWorkerID
public void reportIDs(java.lang.String sessionID, java.lang.String typeID, java.lang.String workerID, long timeStamp)
reportIDs
in interface StatsReport
public void reportIterationCount(int iterationCount)
StatsReport
reportIterationCount
in interface StatsReport
public void reportStatsCollectionDurationMS(int statsCollectionDurationMS)
StatsReport
reportStatsCollectionDurationMS
in interface StatsReport
public void reportScore(double currentScore)
StatsReport
reportScore
in interface StatsReport
public void reportLearningRates(java.util.Map<java.lang.String,java.lang.Double> learningRatesByParam)
StatsReport
reportLearningRates
in interface StatsReport
public void reportMemoryUse(long jvmCurrentBytes, long jvmMaxBytes, long offHeapCurrentBytes, long offHeapMaxBytes, long[] deviceCurrentBytes, long[] deviceMaxBytes)
StatsReport
reportMemoryUse
in interface StatsReport
jvmCurrentBytes
- Current bytes used by the JVMjvmMaxBytes
- Max bytes usable by the JVM (heap)offHeapCurrentBytes
- Current off-heap bytes usedoffHeapMaxBytes
- Maximum off-heap bytesdeviceCurrentBytes
- Current bytes used by each device (GPU, etc). May be null if no devices are presentdeviceMaxBytes
- Maximum bytes for each device (GPU, etc). May be null if no devices are presentpublic void reportPerformance(long totalRuntimeMs, long totalExamples, long totalMinibatches, double examplesPerSecond, double minibatchesPerSecond)
StatsReport
reportPerformance
in interface StatsReport
totalRuntimeMs
- Overall runtime since initializationtotalExamples
- Total examples processed since initializationtotalMinibatches
- Total number of minibatches (iterations) since initializationexamplesPerSecond
- Examples per second since last reportminibatchesPerSecond
- Minibatches per second since last reportpublic void reportGarbageCollection(java.lang.String gcName, int deltaGCCount, int deltaGCTime)
StatsReport
reportGarbageCollection
in interface StatsReport
gcName
- Garbage collector namedeltaGCCount
- Change in the total number of garbage collections, since last reportdeltaGCTime
- Change in the amount of time (milliseconds) for garbage collection, since last reportpublic java.util.List<Pair<java.lang.String,int[]>> getGarbageCollectionStats()
StatsReport
getGarbageCollectionStats
in interface StatsReport
public void reportHistograms(StatsType statsType, java.util.Map<java.lang.String,Histogram> histogram)
StatsReport
StatsType
reportHistograms
in interface StatsReport
statsType
- StatsType: Parameters, Updates, Activationshistogram
- Histogram values for all parameterspublic java.util.Map<java.lang.String,Histogram> getHistograms(StatsType statsType)
StatsReport
getHistograms
in interface StatsReport
statsType
- Stats type (Params/updatse/activations) to get histograms forpublic void reportMean(StatsType statsType, java.util.Map<java.lang.String,java.lang.Double> mean)
StatsReport
reportMean
in interface StatsReport
statsType
- Stats type to reportmean
- Map of mean values, by parameterpublic java.util.Map<java.lang.String,java.lang.Double> getMean(StatsType statsType)
StatsReport
getMean
in interface StatsReport
statsType
- Stats type to get mean values forpublic void reportStdev(StatsType statsType, java.util.Map<java.lang.String,java.lang.Double> stdev)
StatsReport
reportStdev
in interface StatsReport
statsType
- Stats type to report std. dev values forstdev
- Map of std dev values by parameterpublic java.util.Map<java.lang.String,java.lang.Double> getStdev(StatsType statsType)
StatsReport
getStdev
in interface StatsReport
statsType
- Stats type to get std dev values forpublic void reportMeanMagnitudes(StatsType statsType, java.util.Map<java.lang.String,java.lang.Double> meanMagnitudes)
StatsReport
reportMeanMagnitudes
in interface StatsReport
statsType
- Stats type to report mean magnitude values formeanMagnitudes
- Map of mean magnitude values by parameterpublic void reportDataSetMetaData(java.util.List<java.io.Serializable> dataSetMetaData, java.lang.Class<?> metaDataClass)
StatsReport
reportDataSetMetaData
in interface StatsReport
dataSetMetaData
- MetaData for the DataSetmetaDataClass
- Class of the metadata. Can be later retieved using StatsReport.getDataSetMetaDataClassName()
public void reportDataSetMetaData(java.util.List<java.io.Serializable> dataSetMetaData, java.lang.String metaDataClass)
StatsReport
reportDataSetMetaData
in interface StatsReport
dataSetMetaData
- MetaData for the DataSetmetaDataClass
- Class of the metadata. Can be later retieved using StatsReport.getDataSetMetaDataClassName()
public java.util.Map<java.lang.String,java.lang.Double> getMeanMagnitudes(StatsType statsType)
StatsReport
getMeanMagnitudes
in interface StatsReport
statsType
- Stats type to get mean magnitude values forpublic java.util.List<java.io.Serializable> getDataSetMetaData()
StatsReport
getDataSetMetaData
in interface StatsReport
public java.lang.String getDataSetMetaDataClassName()
StatsReport
getDataSetMetaDataClassName
in interface StatsReport
public java.util.Map<java.lang.String,java.lang.Double> getLearningRates()
StatsReport
getLearningRates
in interface StatsReport
public boolean hasScore()
StatsReport
hasScore
in interface StatsReport
public boolean hasLearningRates()
StatsReport
hasLearningRates
in interface StatsReport
public boolean hasMemoryUse()
StatsReport
hasMemoryUse
in interface StatsReport
public boolean hasPerformance()
StatsReport
hasPerformance
in interface StatsReport
public boolean hasGarbageCollection()
StatsReport
hasGarbageCollection
in interface StatsReport
public boolean hasHistograms(StatsType statsType)
StatsReport
hasHistograms
in interface StatsReport
statsType
- Stats typepublic boolean hasSummaryStats(StatsType statsType, SummaryType summaryType)
StatsReport
hasSummaryStats
in interface StatsReport
statsType
- stats type (Parameters, Updates, Activations)summaryType
- Summary statistic type (mean, stdev, mean magnitude)public boolean hasDataSetMetaData()
StatsReport
hasDataSetMetaData
in interface StatsReport
public int encodingLengthBytes()
Persistable
Persistable.encode()
Length may be different using Persistable.encode(OutputStream)
, due to things like stream headersencodingLengthBytes
in interface Persistable
public byte[] encode()
encode
in interface Persistable
public void encode(java.nio.ByteBuffer buffer)
Persistable
ByteBuffer
encode
in interface Persistable
public void encode(java.io.OutputStream outputStream) throws java.io.IOException
Persistable
encode
in interface Persistable
java.io.IOException
public void decode(byte[] decode)
Persistable
decode
in interface Persistable
public void decode(java.nio.ByteBuffer buffer)
Persistable
ByteBuffer
decode
in interface Persistable
public void decode(java.io.InputStream inputStream) throws java.io.IOException
Persistable
decode
in interface Persistable
java.io.IOException