You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by ni...@apache.org on 2019/03/19 20:25:48 UTC

[systemml] 01/05: [MINOR] Fixes bug causing stats output to be cleared in JMLC

This is an automated email from the ASF dual-hosted git repository.

niketanpansare pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/systemml.git

commit aa7e0a9baa63622bf5a778ae81e8f65313a45f2f
Author: Anthony Thomas <ah...@eng.ucsd.edu>
AuthorDate: Mon Nov 12 18:56:31 2018 +0530

    [MINOR] Fixes bug causing stats output to be cleared in JMLC
    
    Closes #843.
---
 jmlc.md | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/jmlc.md b/jmlc.md
index 08d1688..e0d72ea 100644
--- a/jmlc.md
+++ b/jmlc.md
@@ -53,7 +53,7 @@ dependent on the nature of the business use case being addressed.
 
 JMLC can be configured to gather runtime statistics, as in the MLContext API, by calling Connection's `setStatistics()`
 method with a value of `true`. JMLC can also be configured to gather statistics on the memory used by matrices and
-frames in the DML script. To enable collection of memory statistics, call Connection's `gatherMemStats()` method
+frames in the DML script. To enable collection of memory statistics, call PreparedScript's `gatherMemStats()` method
 with a value of `true`. When finegrained statistics are enabled in `SystemML.conf`, JMLC will also report the variables
 in the DML script which used the most memory. An example showing how to enable statistics in JMLC is presented in the
 section below.
@@ -122,10 +122,6 @@ the resulting `"predicted_y"` matrix. We repeat this process. When done, we clos
  
         // obtain connection to SystemML
         Connection conn = new Connection();
-
-        // turn on gathering of runtime statistics and memory use
-        conn.setStatistics(true);
-        conn.gatherMemStats(true);
  
         // read in and precompile DML script, registering inputs and outputs
         String dml = conn.readScript("scoring-example.dml");
@@ -135,6 +131,10 @@ the resulting `"predicted_y"` matrix. We repeat this process. When done, we clos
         String plan = script.explain();
         System.out.println(plan);
 
+        // turn on gathering of runtime statistics and memory use
+        script.setStatistics(true);
+        script.gatherMemStats(true);
+
         double[][] mtx = matrix(4, 3, new double[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 });
         double[][] result = null;