Interface StatsReport

    • Method Detail

      • reportIDs

        void reportIDs​(String sessionID,
                       String typeID,
                       String workerID,
                       long timestamp)
      • 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
      • getLearningRates

        Map<String,​Double> getLearningRates()
        Get 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 JVM
        jvmMaxBytes - Max bytes usable by the JVM (heap)
        offHeapCurrentBytes - Current off-heap bytes used
        offHeapMaxBytes - Maximum off-heap bytes
        deviceCurrentBytes - Current bytes used by each device (GPU, etc). May be null if no devices are present
        deviceMaxBytes - 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 initialization
        totalExamples - Total examples processed since initialization
        totalMinibatches - Total number of minibatches (iterations) since initialization
        examplesPerSecond - Examples per second since last report
        minibatchesPerSecond - 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 name
        deltaGCCount - Change in the total number of garbage collections, since last report
        deltaGCTime - 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 given StatsType
        Parameters:
        statsType - StatsType: Parameters, Updates, Activations
        histogram - 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 report
        mean - 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 for
        stdev - 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 for
        meanMagnitudes - 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 DataSet
        metaDataClass - Class of the metadata. Can be later retieved using getDataSetMetaDataClassName()
      • reportDataSetMetaData

        void reportDataSetMetaData​(List<Serializable> dataSetMetaData,
                                   String metaDataClass)
        Report any metadata for the DataSet
        Parameters:
        dataSetMetaData - MetaData for the DataSet
        metaDataClass - Class of the metadata. Can be later retieved using getDataSetMetaDataClassName()
      • 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