Class SbeStatsReport
- java.lang.Object
-
- org.deeplearning4j.ui.model.stats.impl.SbeStatsReport
-
- All Implemented Interfaces:
Serializable,Persistable,StatsReport,AgronaPersistable
public class SbeStatsReport extends Object implements StatsReport, AgronaPersistable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SbeStatsReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(byte[] decode)voiddecode(InputStream inputStream)voiddecode(ByteBuffer buffer)voiddecode(org.agrona.DirectBuffer buffer)byte[]encode()voidencode(OutputStream outputStream)voidencode(ByteBuffer buffer)voidencode(org.agrona.MutableDirectBuffer buffer)intencodingLengthBytes()List<Serializable>getDataSetMetaData()Get the DataSet metadata, if any (null otherwise).StringgetDataSetMetaDataClassName()Get the classList<org.nd4j.common.primitives.Pair<String,int[]>>getGarbageCollectionStats()Get the garbage collection stats: Pair contains GC name and the delta count/time valuesMap<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 parameterMap<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)StringgetSessionID()Map<String,Double>getStdev(StatsType statsType)Get the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)longgetTimeStamp()StringgetTypeID()StringgetWorkerID()booleanhasDataSetMetaData()Return whether any DataSet metadata is present or notbooleanhasGarbageCollection()Return whether garbage collection information has been reportedbooleanhasHistograms(StatsType statsType)Return whether histograms have been reported, for the given stats type (Parameters, Updates, Activations)booleanhasLearningRates()Return whether the learning rates are present (have been reported)booleanhasMemoryUse()Return whether memory use has been reportedbooleanhasPerformance()Return whether performance stats (total time, total examples etc) have been reportedbooleanhasScore()Return whether the score is present (has been reported)booleanhasSummaryStats(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)voidreportDataSetMetaData(List<Serializable> dataSetMetaData, Class<?> metaDataClass)Report any metadata for the DataSetvoidreportDataSetMetaData(List<Serializable> dataSetMetaData, String metaDataClass)Report any metadata for the DataSetvoidreportGarbageCollection(String gcName, int deltaGCCount, int deltaGCTime)Report Garbage collection statsvoidreportHistograms(StatsType statsType, Map<String,Histogram> histogram)Report histograms for all parameters, for a givenStatsTypevoidreportIDs(String sessionID, String typeID, String workerID, long timeStamp)voidreportIterationCount(int iterationCount)Report the current iteration numbervoidreportLearningRates(Map<String,Double> learningRatesByParam)Report the learning rates by parametervoidreportMean(StatsType statsType, Map<String,Double> mean)Report the mean values for each parameter, the given StatsType (Parameters/Updates/Activations)voidreportMeanMagnitudes(StatsType statsType, Map<String,Double> meanMagnitudes)Report the mean magnitude values for each parameter for the given StatsType (Parameters/Updates/Activations)voidreportMemoryUse(long jvmCurrentBytes, long jvmMaxBytes, long offHeapCurrentBytes, long offHeapMaxBytes, long[] deviceCurrentBytes, long[] deviceMaxBytes)Report the memory stats at this iterationvoidreportPerformance(long totalRuntimeMs, long totalExamples, long totalMinibatches, double examplesPerSecond, double minibatchesPerSecond)Report the performance stats (since the last report)voidreportScore(double currentScore)Report model score at the current iterationvoidreportStatsCollectionDurationMS(int statsCollectionDurationMS)Report the number of milliseconds required to calculate all of the stats.voidreportStdev(StatsType statsType, Map<String,Double> stdev)Report the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.deeplearning4j.ui.model.stats.api.StatsReport
getDeviceCurrentBytes, getDeviceMaxBytes, getExamplesPerSecond, getIterationCount, getJvmCurrentBytes, getJvmMaxBytes, getMinibatchesPerSecond, getOffHeapCurrentBytes, getOffHeapMaxBytes, getScore, getStatsCollectionDurationMs, getTotalExamples, getTotalMinibatches, getTotalRuntimeMs
-
-
-
-
Method Detail
-
reportIDs
public void reportIDs(String sessionID, String typeID, String workerID, long timeStamp)
- Specified by:
reportIDsin interfaceStatsReport
-
reportIterationCount
public void reportIterationCount(int iterationCount)
Description copied from interface:StatsReportReport the current iteration number- Specified by:
reportIterationCountin interfaceStatsReport
-
reportStatsCollectionDurationMS
public void reportStatsCollectionDurationMS(int statsCollectionDurationMS)
Description copied from interface:StatsReportReport the number of milliseconds required to calculate all of the stats. This is effectively the amount of listener overhead- Specified by:
reportStatsCollectionDurationMSin interfaceStatsReport
-
reportScore
public void reportScore(double currentScore)
Description copied from interface:StatsReportReport model score at the current iteration- Specified by:
reportScorein interfaceStatsReport
-
reportLearningRates
public void reportLearningRates(Map<String,Double> learningRatesByParam)
Description copied from interface:StatsReportReport the learning rates by parameter- Specified by:
reportLearningRatesin interfaceStatsReport
-
getLearningRates
public Map<String,Double> getLearningRates()
Description copied from interface:StatsReportGet the learning rates by parameter- Specified by:
getLearningRatesin interfaceStatsReport
-
reportMemoryUse
public void reportMemoryUse(long jvmCurrentBytes, long jvmMaxBytes, long offHeapCurrentBytes, long offHeapMaxBytes, long[] deviceCurrentBytes, long[] deviceMaxBytes)Description copied from interface:StatsReportReport the memory stats at this iteration- Specified by:
reportMemoryUsein interfaceStatsReport- Parameters:
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 present
-
reportPerformance
public void reportPerformance(long totalRuntimeMs, long totalExamples, long totalMinibatches, double examplesPerSecond, double minibatchesPerSecond)Description copied from interface:StatsReportReport the performance stats (since the last report)- Specified by:
reportPerformancein interfaceStatsReport- Parameters:
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 report
-
reportGarbageCollection
public void reportGarbageCollection(String gcName, int deltaGCCount, int deltaGCTime)
Description copied from interface:StatsReportReport Garbage collection stats- Specified by:
reportGarbageCollectionin interfaceStatsReport- Parameters:
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 report
-
getGarbageCollectionStats
public List<org.nd4j.common.primitives.Pair<String,int[]>> getGarbageCollectionStats()
Description copied from interface:StatsReportGet the garbage collection stats: Pair contains GC name and the delta count/time values- Specified by:
getGarbageCollectionStatsin interfaceStatsReport
-
reportHistograms
public void reportHistograms(StatsType statsType, Map<String,Histogram> histogram)
Description copied from interface:StatsReportReport histograms for all parameters, for a givenStatsType- Specified by:
reportHistogramsin interfaceStatsReport- Parameters:
statsType- StatsType: Parameters, Updates, Activationshistogram- Histogram values for all parameters
-
getHistograms
public Map<String,Histogram> getHistograms(StatsType statsType)
Description copied from interface:StatsReportGet the histograms for all parameters, for a given StatsType (Parameters/Updates/Activations)- Specified by:
getHistogramsin interfaceStatsReport- Parameters:
statsType- Stats type (Params/updatse/activations) to get histograms for- Returns:
- Histograms by parameter name, or null if not available
-
reportMean
public void reportMean(StatsType statsType, Map<String,Double> mean)
Description copied from interface:StatsReportReport the mean values for each parameter, the given StatsType (Parameters/Updates/Activations)- Specified by:
reportMeanin interfaceStatsReport- Parameters:
statsType- Stats type to reportmean- Map of mean values, by parameter
-
getMean
public Map<String,Double> getMean(StatsType statsType)
Description copied from interface:StatsReportGet the mean values for each parameter for the given StatsType (Parameters/Updates/Activations)- Specified by:
getMeanin interfaceStatsReport- Parameters:
statsType- Stats type to get mean values for- Returns:
- Map of mean values by parameter
-
reportStdev
public void reportStdev(StatsType statsType, Map<String,Double> stdev)
Description copied from interface:StatsReportReport the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)- Specified by:
reportStdevin interfaceStatsReport- Parameters:
statsType- Stats type to report std. dev values forstdev- Map of std dev values by parameter
-
getStdev
public Map<String,Double> getStdev(StatsType statsType)
Description copied from interface:StatsReportGet the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)- Specified by:
getStdevin interfaceStatsReport- Parameters:
statsType- Stats type to get std dev values for- Returns:
- Map of stdev values by parameter
-
reportMeanMagnitudes
public void reportMeanMagnitudes(StatsType statsType, Map<String,Double> meanMagnitudes)
Description copied from interface:StatsReportReport the mean magnitude values for each parameter for the given StatsType (Parameters/Updates/Activations)- Specified by:
reportMeanMagnitudesin interfaceStatsReport- Parameters:
statsType- Stats type to report mean magnitude values formeanMagnitudes- Map of mean magnitude values by parameter
-
reportDataSetMetaData
public void reportDataSetMetaData(List<Serializable> dataSetMetaData, Class<?> metaDataClass)
Description copied from interface:StatsReportReport any metadata for the DataSet- Specified by:
reportDataSetMetaDatain interfaceStatsReport- Parameters:
dataSetMetaData- MetaData for the DataSetmetaDataClass- Class of the metadata. Can be later retieved usingStatsReport.getDataSetMetaDataClassName()
-
reportDataSetMetaData
public void reportDataSetMetaData(List<Serializable> dataSetMetaData, String metaDataClass)
Description copied from interface:StatsReportReport any metadata for the DataSet- Specified by:
reportDataSetMetaDatain interfaceStatsReport- Parameters:
dataSetMetaData- MetaData for the DataSetmetaDataClass- Class of the metadata. Can be later retieved usingStatsReport.getDataSetMetaDataClassName()
-
getMeanMagnitudes
public Map<String,Double> getMeanMagnitudes(StatsType statsType)
Description copied from interface:StatsReportGet the mean magnitude values for each parameter for the given StatsType (Parameters/Updates/Activations)- Specified by:
getMeanMagnitudesin interfaceStatsReport- Parameters:
statsType- Stats type to get mean magnitude values for- Returns:
- Map of mean magnitude values by parameter
-
getDataSetMetaData
public List<Serializable> getDataSetMetaData()
Description copied from interface:StatsReportGet the DataSet metadata, if any (null otherwise). Note: due to serialization issues, this may in principle throw an unchecked exception related to class availability, serialization etc.- Specified by:
getDataSetMetaDatain interfaceStatsReport- Returns:
- List of DataSet metadata, if any.
-
getDataSetMetaDataClassName
public String getDataSetMetaDataClassName()
Description copied from interface:StatsReportGet the class- Specified by:
getDataSetMetaDataClassNamein interfaceStatsReport- Returns:
-
hasScore
public boolean hasScore()
Description copied from interface:StatsReportReturn whether the score is present (has been reported)- Specified by:
hasScorein interfaceStatsReport
-
hasLearningRates
public boolean hasLearningRates()
Description copied from interface:StatsReportReturn whether the learning rates are present (have been reported)- Specified by:
hasLearningRatesin interfaceStatsReport
-
hasMemoryUse
public boolean hasMemoryUse()
Description copied from interface:StatsReportReturn whether memory use has been reported- Specified by:
hasMemoryUsein interfaceStatsReport
-
hasPerformance
public boolean hasPerformance()
Description copied from interface:StatsReportReturn whether performance stats (total time, total examples etc) have been reported- Specified by:
hasPerformancein interfaceStatsReport
-
hasGarbageCollection
public boolean hasGarbageCollection()
Description copied from interface:StatsReportReturn whether garbage collection information has been reported- Specified by:
hasGarbageCollectionin interfaceStatsReport
-
hasHistograms
public boolean hasHistograms(StatsType statsType)
Description copied from interface:StatsReportReturn whether histograms have been reported, for the given stats type (Parameters, Updates, Activations)- Specified by:
hasHistogramsin interfaceStatsReport- Parameters:
statsType- Stats type
-
hasSummaryStats
public boolean hasSummaryStats(StatsType statsType, SummaryType summaryType)
Description copied from interface:StatsReportReturn whether the summary stats (mean, standard deviation, mean magnitudes) have been reported for the given stats type (Parameters, Updates, Activations)- Specified by:
hasSummaryStatsin interfaceStatsReport- Parameters:
statsType- stats type (Parameters, Updates, Activations)summaryType- Summary statistic type (mean, stdev, mean magnitude)
-
hasDataSetMetaData
public boolean hasDataSetMetaData()
Description copied from interface:StatsReportReturn whether any DataSet metadata is present or not- Specified by:
hasDataSetMetaDatain interfaceStatsReport- Returns:
- True if DataSet metadata is present
-
getSessionID
public String getSessionID()
- Specified by:
getSessionIDin interfacePersistable
-
getTypeID
public String getTypeID()
- Specified by:
getTypeIDin interfacePersistable
-
getWorkerID
public String getWorkerID()
- Specified by:
getWorkerIDin interfacePersistable
-
getTimeStamp
public long getTimeStamp()
- Specified by:
getTimeStampin interfacePersistable
-
encodingLengthBytes
public int encodingLengthBytes()
- Specified by:
encodingLengthBytesin interfacePersistable
-
encode
public byte[] encode()
- Specified by:
encodein interfacePersistable
-
encode
public void encode(ByteBuffer buffer)
- Specified by:
encodein interfacePersistable
-
encode
public void encode(org.agrona.MutableDirectBuffer buffer)
- Specified by:
encodein interfaceAgronaPersistable
-
encode
public void encode(OutputStream outputStream) throws IOException
- Specified by:
encodein interfacePersistable- Throws:
IOException
-
decode
public void decode(byte[] decode)
- Specified by:
decodein interfacePersistable
-
decode
public void decode(ByteBuffer buffer)
- Specified by:
decodein interfacePersistable
-
decode
public void decode(org.agrona.DirectBuffer buffer)
- Specified by:
decodein interfaceAgronaPersistable
-
decode
public void decode(InputStream inputStream) throws IOException
- Specified by:
decodein interfacePersistable- Throws:
IOException
-
-