public class SbeStatsReport extends Object implements StatsReport, AgronaPersistable
StatsReport using Simple Binary Encoding (SBE)| Constructor and Description |
|---|
SbeStatsReport() |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(byte[] decode) |
void |
decode(ByteBuffer buffer) |
void |
decode(org.agrona.DirectBuffer buffer) |
void |
decode(InputStream inputStream) |
byte[] |
encode() |
void |
encode(ByteBuffer buffer) |
void |
encode(org.agrona.MutableDirectBuffer buffer) |
void |
encode(OutputStream outputStream) |
int |
encodingLengthBytes() |
List<Serializable> |
getDataSetMetaData()
Get the DataSet metadata, if any (null otherwise).
|
String |
getDataSetMetaDataClassName()
Get the class
|
List<org.nd4j.linalg.primitives.Pair<String,int[]>> |
getGarbageCollectionStats()
Get the garbage collection stats: Pair contains GC name and the delta count/time values
|
Map<String,Histogram> |
getHistograms(StatsType statsType)
Get the histograms for all parameters, for a given StatsType (Parameters/Updates/Activations)
|
Map<String,Double> |
getLearningRates()
Get the learning rates by parameter
|
Map<String,Double> |
getMean(StatsType statsType)
Get the mean values for each parameter for the given StatsType (Parameters/Updates/Activations)
|
Map<String,Double> |
getMeanMagnitudes(StatsType statsType)
Get the mean magnitude values for each parameter for the given StatsType (Parameters/Updates/Activations)
|
String |
getSessionID() |
Map<String,Double> |
getStdev(StatsType statsType)
Get the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)
|
long |
getTimeStamp() |
String |
getTypeID() |
String |
getWorkerID() |
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(List<Serializable> dataSetMetaData,
Class<?> metaDataClass)
Report any metadata for the DataSet
|
void |
reportDataSetMetaData(List<Serializable> dataSetMetaData,
String metaDataClass)
Report any metadata for the DataSet
|
void |
reportGarbageCollection(String gcName,
int deltaGCCount,
int deltaGCTime)
Report Garbage collection stats
|
void |
reportHistograms(StatsType statsType,
Map<String,Histogram> histogram)
Report histograms for all parameters, for a given
StatsType |
void |
reportIDs(String sessionID,
String typeID,
String workerID,
long timeStamp) |
void |
reportIterationCount(int iterationCount)
Report the current iteration number
|
void |
reportLearningRates(Map<String,Double> learningRatesByParam)
Report the learning rates by parameter
|
void |
reportMean(StatsType statsType,
Map<String,Double> mean)
Report the mean values for each parameter, the given StatsType (Parameters/Updates/Activations)
|
void |
reportMeanMagnitudes(StatsType statsType,
Map<String,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,
Map<String,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, getTotalRuntimeMspublic void reportIDs(String sessionID, String typeID, 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(Map<String,Double> learningRatesByParam)
StatsReportreportLearningRates in interface StatsReportpublic Map<String,Double> getLearningRates()
StatsReportgetLearningRates 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(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 List<org.nd4j.linalg.primitives.Pair<String,int[]>> getGarbageCollectionStats()
StatsReportgetGarbageCollectionStats in interface StatsReportpublic void reportHistograms(StatsType statsType, Map<String,Histogram> histogram)
StatsReportStatsTypereportHistograms in interface StatsReportstatsType - StatsType: Parameters, Updates, Activationshistogram - Histogram values for all parameterspublic Map<String,Histogram> getHistograms(StatsType statsType)
StatsReportgetHistograms in interface StatsReportstatsType - Stats type (Params/updatse/activations) to get histograms forpublic void reportMean(StatsType statsType, Map<String,Double> mean)
StatsReportreportMean in interface StatsReportstatsType - Stats type to reportmean - Map of mean values, by parameterpublic Map<String,Double> getMean(StatsType statsType)
StatsReportgetMean in interface StatsReportstatsType - Stats type to get mean values forpublic void reportStdev(StatsType statsType, Map<String,Double> stdev)
StatsReportreportStdev in interface StatsReportstatsType - Stats type to report std. dev values forstdev - Map of std dev values by parameterpublic Map<String,Double> getStdev(StatsType statsType)
StatsReportgetStdev in interface StatsReportstatsType - Stats type to get std dev values forpublic void reportMeanMagnitudes(StatsType statsType, Map<String,Double> meanMagnitudes)
StatsReportreportMeanMagnitudes in interface StatsReportstatsType - Stats type to report mean magnitude values formeanMagnitudes - Map of mean magnitude values by parameterpublic void reportDataSetMetaData(List<Serializable> dataSetMetaData, Class<?> metaDataClass)
StatsReportreportDataSetMetaData in interface StatsReportdataSetMetaData - MetaData for the DataSetmetaDataClass - Class of the metadata. Can be later retieved using StatsReport.getDataSetMetaDataClassName()public void reportDataSetMetaData(List<Serializable> dataSetMetaData, String metaDataClass)
StatsReportreportDataSetMetaData in interface StatsReportdataSetMetaData - MetaData for the DataSetmetaDataClass - Class of the metadata. Can be later retieved using StatsReport.getDataSetMetaDataClassName()public Map<String,Double> getMeanMagnitudes(StatsType statsType)
StatsReportgetMeanMagnitudes in interface StatsReportstatsType - Stats type to get mean magnitude values forpublic List<Serializable> getDataSetMetaData()
StatsReportgetDataSetMetaData in interface StatsReportpublic String getDataSetMetaDataClassName()
StatsReportgetDataSetMetaDataClassName 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 String getSessionID()
getSessionID in interface Persistablepublic String getTypeID()
getTypeID in interface Persistablepublic String getWorkerID()
getWorkerID in interface Persistablepublic long getTimeStamp()
getTimeStamp in interface Persistablepublic int encodingLengthBytes()
encodingLengthBytes in interface Persistablepublic byte[] encode()
encode in interface Persistablepublic void encode(ByteBuffer buffer)
encode in interface Persistablepublic void encode(org.agrona.MutableDirectBuffer buffer)
encode in interface AgronaPersistablepublic void encode(OutputStream outputStream) throws IOException
encode in interface PersistableIOExceptionpublic void decode(byte[] decode)
decode in interface Persistablepublic void decode(ByteBuffer buffer)
decode in interface Persistablepublic void decode(org.agrona.DirectBuffer buffer)
decode in interface AgronaPersistablepublic void decode(InputStream inputStream) throws IOException
decode in interface PersistableIOExceptionCopyright © 2019. All rights reserved.