Interface StatsReport
-
- All Superinterfaces:
Persistable
,Serializable
- All Known Implementing Classes:
JavaStatsReport
,SbeStatsReport
public interface StatsReport extends Persistable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Serializable>
getDataSetMetaData()
Get the DataSet metadata, if any (null otherwise).String
getDataSetMetaDataClassName()
Get the classlong[]
getDeviceCurrentBytes()
Get device (GPU, etc) current bytes - may be null if no compute devices are present in the systemlong[]
getDeviceMaxBytes()
Get device (GPU, etc) maximum bytes - may be null if no compute devices are present in the systemdouble
getExamplesPerSecond()
Get examples per second since the last reportList<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)int
getIterationCount()
Get the current iteration numberlong
getJvmCurrentBytes()
Get JVM memory - current bytes usedlong
getJvmMaxBytes()
Get JVM memory - max available bytesMap<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)double
getMinibatchesPerSecond()
Get the number of minibatches per second, since the last reportlong
getOffHeapCurrentBytes()
Get off-heap memory - current bytes usedlong
getOffHeapMaxBytes()
Get off-heap memory - max available bytesdouble
getScore()
Get the score at the current iterationint
getStatsCollectionDurationMs()
Get the number of millisecons required to calculate al of the stats.Map<String,Double>
getStdev(StatsType statsType)
Get the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)long
getTotalExamples()
Get total number of examples that have been processed since initializationlong
getTotalMinibatches()
Get the total number of minibatches that have been processed since initializationlong
getTotalRuntimeMs()
Get the total runtime since listener/model initializationboolean
hasDataSetMetaData()
Return whether any DataSet metadata is present or notboolean
hasGarbageCollection()
Return whether garbage collection information has been reportedboolean
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 reportedboolean
hasPerformance()
Return whether performance stats (total time, total examples etc) have been reportedboolean
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 DataSetvoid
reportDataSetMetaData(List<Serializable> dataSetMetaData, String metaDataClass)
Report any metadata for the DataSetvoid
reportGarbageCollection(String gcName, int deltaGCCount, int deltaGCTime)
Report Garbage collection statsvoid
reportHistograms(StatsType statsType, Map<String,Histogram> histogram)
Report histograms for all parameters, for a givenStatsType
void
reportIDs(String sessionID, String typeID, String workerID, long timestamp)
void
reportIterationCount(int iterationCount)
Report the current iteration numbervoid
reportLearningRates(Map<String,Double> learningRatesByParam)
Report the learning rates by parametervoid
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 iterationvoid
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 iterationvoid
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)-
Methods inherited from interface org.deeplearning4j.core.storage.Persistable
decode, decode, decode, encode, encode, encode, encodingLengthBytes, getSessionID, getTimeStamp, getTypeID, getWorkerID
-
-
-
-
Method Detail
-
reportIterationCount
void reportIterationCount(int iterationCount)
Report the current iteration number
-
getIterationCount
int getIterationCount()
Get the current iteration number
-
reportStatsCollectionDurationMS
void reportStatsCollectionDurationMS(int statsCollectionDurationMS)
Report the number of milliseconds required to calculate all of the stats. This is effectively the amount of listener overhead
-
getStatsCollectionDurationMs
int getStatsCollectionDurationMs()
Get the number of millisecons required to calculate al of the stats. This is effectively the amount of listener overhead.
-
reportScore
void reportScore(double currentScore)
Report model score at the current iteration
-
getScore
double getScore()
Get the score at the current iteration
-
reportLearningRates
void reportLearningRates(Map<String,Double> learningRatesByParam)
Report the learning rates by parameter
-
reportMemoryUse
void reportMemoryUse(long jvmCurrentBytes, long jvmMaxBytes, long offHeapCurrentBytes, long offHeapMaxBytes, long[] deviceCurrentBytes, long[] deviceMaxBytes)
Report the memory stats at this iteration- 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
-
getJvmCurrentBytes
long getJvmCurrentBytes()
Get JVM memory - current bytes used
-
getJvmMaxBytes
long getJvmMaxBytes()
Get JVM memory - max available bytes
-
getOffHeapCurrentBytes
long getOffHeapCurrentBytes()
Get off-heap memory - current bytes used
-
getOffHeapMaxBytes
long getOffHeapMaxBytes()
Get off-heap memory - max available bytes
-
getDeviceCurrentBytes
long[] getDeviceCurrentBytes()
Get device (GPU, etc) current bytes - may be null if no compute devices are present in the system
-
getDeviceMaxBytes
long[] getDeviceMaxBytes()
Get device (GPU, etc) maximum bytes - may be null if no compute devices are present in the system
-
reportPerformance
void reportPerformance(long totalRuntimeMs, long totalExamples, long totalMinibatches, double examplesPerSecond, double minibatchesPerSecond)
Report the performance stats (since the last report)- 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
-
getTotalRuntimeMs
long getTotalRuntimeMs()
Get the total runtime since listener/model initialization
-
getTotalExamples
long getTotalExamples()
Get total number of examples that have been processed since initialization
-
getTotalMinibatches
long getTotalMinibatches()
Get the total number of minibatches that have been processed since initialization
-
getExamplesPerSecond
double getExamplesPerSecond()
Get examples per second since the last report
-
getMinibatchesPerSecond
double getMinibatchesPerSecond()
Get the number of minibatches per second, since the last report
-
reportGarbageCollection
void reportGarbageCollection(String gcName, int deltaGCCount, int deltaGCTime)
Report Garbage collection stats- 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
List<org.nd4j.common.primitives.Pair<String,int[]>> getGarbageCollectionStats()
Get the garbage collection stats: Pair contains GC name and the delta count/time values
-
reportHistograms
void reportHistograms(StatsType statsType, Map<String,Histogram> histogram)
Report histograms for all parameters, for a givenStatsType
- Parameters:
statsType
- StatsType: Parameters, Updates, Activationshistogram
- Histogram values for all parameters
-
getHistograms
Map<String,Histogram> getHistograms(StatsType statsType)
Get the histograms for all parameters, for a given StatsType (Parameters/Updates/Activations)- Parameters:
statsType
- Stats type (Params/updatse/activations) to get histograms for- Returns:
- Histograms by parameter name, or null if not available
-
reportMean
void reportMean(StatsType statsType, Map<String,Double> mean)
Report the mean values for each parameter, the given StatsType (Parameters/Updates/Activations)- Parameters:
statsType
- Stats type to reportmean
- Map of mean values, by parameter
-
getMean
Map<String,Double> getMean(StatsType statsType)
Get the mean values for each parameter for the given StatsType (Parameters/Updates/Activations)- Parameters:
statsType
- Stats type to get mean values for- Returns:
- Map of mean values by parameter
-
reportStdev
void reportStdev(StatsType statsType, Map<String,Double> stdev)
Report the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)- Parameters:
statsType
- Stats type to report std. dev values forstdev
- Map of std dev values by parameter
-
getStdev
Map<String,Double> getStdev(StatsType statsType)
Get the standard deviation values for each parameter for the given StatsType (Parameters/Updates/Activations)- Parameters:
statsType
- Stats type to get std dev values for- Returns:
- Map of stdev values by parameter
-
reportMeanMagnitudes
void reportMeanMagnitudes(StatsType statsType, Map<String,Double> meanMagnitudes)
Report the mean magnitude values for each parameter for the given StatsType (Parameters/Updates/Activations)- Parameters:
statsType
- Stats type to report mean magnitude values formeanMagnitudes
- Map of mean magnitude values by parameter
-
reportDataSetMetaData
void reportDataSetMetaData(List<Serializable> dataSetMetaData, Class<?> metaDataClass)
Report any metadata for the DataSet- Parameters:
dataSetMetaData
- MetaData for the DataSetmetaDataClass
- Class of the metadata. Can be later retieved usinggetDataSetMetaDataClassName()
-
reportDataSetMetaData
void reportDataSetMetaData(List<Serializable> dataSetMetaData, String metaDataClass)
Report any metadata for the DataSet- Parameters:
dataSetMetaData
- MetaData for the DataSetmetaDataClass
- Class of the metadata. Can be later retieved usinggetDataSetMetaDataClassName()
-
getMeanMagnitudes
Map<String,Double> getMeanMagnitudes(StatsType statsType)
Get the mean magnitude values for each parameter for the given StatsType (Parameters/Updates/Activations)- Parameters:
statsType
- Stats type to get mean magnitude values for- Returns:
- Map of mean magnitude values by parameter
-
getDataSetMetaData
List<Serializable> getDataSetMetaData()
Get 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.- Returns:
- List of DataSet metadata, if any.
-
getDataSetMetaDataClassName
String getDataSetMetaDataClassName()
Get the class- Returns:
-
hasScore
boolean hasScore()
Return whether the score is present (has been reported)
-
hasLearningRates
boolean hasLearningRates()
Return whether the learning rates are present (have been reported)
-
hasMemoryUse
boolean hasMemoryUse()
Return whether memory use has been reported
-
hasPerformance
boolean hasPerformance()
Return whether performance stats (total time, total examples etc) have been reported
-
hasGarbageCollection
boolean hasGarbageCollection()
Return whether garbage collection information has been reported
-
hasHistograms
boolean hasHistograms(StatsType statsType)
Return whether histograms have been reported, for the given stats type (Parameters, Updates, Activations)- Parameters:
statsType
- Stats type
-
hasSummaryStats
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)- Parameters:
statsType
- stats type (Parameters, Updates, Activations)summaryType
- Summary statistic type (mean, stdev, mean magnitude)
-
hasDataSetMetaData
boolean hasDataSetMetaData()
Return whether any DataSet metadata is present or not- Returns:
- True if DataSet metadata is present
-
-