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, waitgetDeviceCurrentBytes, getDeviceMaxBytes, getExamplesPerSecond, getIterationCount, getJvmCurrentBytes, getJvmMaxBytes, getMinibatchesPerSecond, getOffHeapCurrentBytes, getOffHeapMaxBytes, getScore, getStatsCollectionDurationMs, getTotalExamples, getTotalMinibatches, getTotalRuntimeMsgetSessionID, getTimeStamp, getTypeID, getWorkerIDpublic void reportIDs(java.lang.String sessionID,
java.lang.String typeID,
java.lang.String workerID,
long timeStamp)
reportIDs in interface StatsReportpublic void reportIterationCount(int iterationCount)
StatsReportreportIterationCount in interface StatsReportpublic void reportStatsCollectionDurationMS(int statsCollectionDurationMS)
StatsReportreportStatsCollectionDurationMS in interface StatsReportpublic void reportScore(double currentScore)
StatsReportreportScore in interface StatsReportpublic void reportLearningRates(java.util.Map<java.lang.String,java.lang.Double> learningRatesByParam)
StatsReportreportLearningRates in interface StatsReportpublic void reportMemoryUse(long jvmCurrentBytes,
long jvmMaxBytes,
long offHeapCurrentBytes,
long offHeapMaxBytes,
long[] deviceCurrentBytes,
long[] deviceMaxBytes)
StatsReportreportMemoryUse in interface StatsReportjvmCurrentBytes - 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)
StatsReportreportPerformance in interface StatsReporttotalRuntimeMs - 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)
StatsReportreportGarbageCollection in interface StatsReportgcName - 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()
StatsReportgetGarbageCollectionStats in interface StatsReportpublic void reportHistograms(StatsType statsType, java.util.Map<java.lang.String,Histogram> histogram)
StatsReportStatsTypereportHistograms in interface StatsReportstatsType - StatsType: Parameters, Updates, Activationshistogram - Histogram values for all parameterspublic java.util.Map<java.lang.String,Histogram> getHistograms(StatsType statsType)
StatsReportgetHistograms in interface StatsReportstatsType - Stats type (Params/updatse/activations) to get histograms forpublic void reportMean(StatsType statsType, java.util.Map<java.lang.String,java.lang.Double> mean)
StatsReportreportMean in interface StatsReportstatsType - Stats type to reportmean - Map of mean values, by parameterpublic java.util.Map<java.lang.String,java.lang.Double> getMean(StatsType statsType)
StatsReportgetMean in interface StatsReportstatsType - Stats type to get mean values forpublic void reportStdev(StatsType statsType, java.util.Map<java.lang.String,java.lang.Double> stdev)
StatsReportreportStdev in interface StatsReportstatsType - 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)
StatsReportgetStdev in interface StatsReportstatsType - Stats type to get std dev values forpublic void reportMeanMagnitudes(StatsType statsType, java.util.Map<java.lang.String,java.lang.Double> meanMagnitudes)
StatsReportreportMeanMagnitudes in interface StatsReportstatsType - 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)
StatsReportreportDataSetMetaData in interface StatsReportdataSetMetaData - 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)
StatsReportreportDataSetMetaData in interface StatsReportdataSetMetaData - 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)
StatsReportgetMeanMagnitudes in interface StatsReportstatsType - Stats type to get mean magnitude values forpublic java.util.List<java.io.Serializable> getDataSetMetaData()
StatsReportgetDataSetMetaData in interface StatsReportpublic java.lang.String getDataSetMetaDataClassName()
StatsReportgetDataSetMetaDataClassName in interface StatsReportpublic java.util.Map<java.lang.String,java.lang.Double> getLearningRates()
StatsReportgetLearningRates in interface StatsReportpublic boolean hasScore()
StatsReporthasScore in interface StatsReportpublic boolean hasLearningRates()
StatsReporthasLearningRates in interface StatsReportpublic boolean hasMemoryUse()
StatsReporthasMemoryUse in interface StatsReportpublic boolean hasPerformance()
StatsReporthasPerformance in interface StatsReportpublic boolean hasGarbageCollection()
StatsReporthasGarbageCollection in interface StatsReportpublic boolean hasHistograms(StatsType statsType)
StatsReporthasHistograms in interface StatsReportstatsType - Stats typepublic boolean hasSummaryStats(StatsType statsType, SummaryType summaryType)
StatsReporthasSummaryStats in interface StatsReportstatsType - stats type (Parameters, Updates, Activations)summaryType - Summary statistic type (mean, stdev, mean magnitude)public boolean hasDataSetMetaData()
StatsReporthasDataSetMetaData in interface StatsReportpublic int encodingLengthBytes()
PersistablePersistable.encode()
Length may be different using Persistable.encode(OutputStream), due to things like stream headersencodingLengthBytes in interface Persistablepublic byte[] encode()
encode in interface Persistablepublic void encode(java.nio.ByteBuffer buffer)
PersistableByteBufferencode in interface Persistablepublic void encode(java.io.OutputStream outputStream)
throws java.io.IOException
Persistableencode in interface Persistablejava.io.IOExceptionpublic void decode(byte[] decode)
Persistabledecode in interface Persistablepublic void decode(java.nio.ByteBuffer buffer)
PersistableByteBufferdecode in interface Persistablepublic void decode(java.io.InputStream inputStream)
throws java.io.IOException
Persistabledecode in interface Persistablejava.io.IOException