[mlpack-svn] r15563 - in mlpack/conf/jenkins-conf/benchmark: . benchmark

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Jul 26 12:52:14 EDT 2013


Author: marcus
Date: Fri Jul 26 12:52:14 2013
New Revision: 15563

Log:
Catch exception if the method fails and set initial timeout.

Modified:
   mlpack/conf/jenkins-conf/benchmark/benchmark/run_benchmark.py
   mlpack/conf/jenkins-conf/benchmark/small_config.yaml

Modified: mlpack/conf/jenkins-conf/benchmark/benchmark/run_benchmark.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/benchmark/run_benchmark.py	(original)
+++ mlpack/conf/jenkins-conf/benchmark/benchmark/run_benchmark.py	Fri Jul 26 12:52:14 2013
@@ -240,10 +240,22 @@
           time = 0
           for trial in range(trials + 1):
             if trial > 0:
-              time += instance.RunMethod(options);
+              try:
+                time += instance.RunMethod(options);
+
+                # Method unsuccessful.
+                if time < 0:
+                  break
+
+                time += methodTime
+              except Exception as e:
+                Log.Fatal("Exception: " + str(e))
 
           # Set time.
-          dataMatrix[row][col] = "{0:.6f}".format(time / trials)
+          if time == -2:
+            dataMatrix[row][col] = ">" + str(timeout)
+          else:
+            dataMatrix[row][col] = "{0:.6f}".format(time / trials)
 
           # Remove temporary datasets.
           RemoveDataset(modifiedDataset[1])

Modified: mlpack/conf/jenkins-conf/benchmark/small_config.yaml
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/small_config.yaml	(original)
+++ mlpack/conf/jenkins-conf/benchmark/small_config.yaml	Fri Jul 26 12:52:14 2013
@@ -2,7 +2,7 @@
 library: general
 settings:
     # Time until a timeout in seconds.
-    timeout: 3
+    timeout: 9000
 
     # Specify the path for the libraries.
     MLPACK_BIN: '/usr/local/bin/'



More information about the mlpack-svn mailing list