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 2016/01/15 23:15:01 UTC

incubator-systemml git commit: SYSTEMML-331: Overloading reset to keep current config

Repository: incubator-systemml
Updated Branches:
  refs/heads/master fe3b56402 -> c71183924


SYSTEMML-331: Overloading reset to keep current config

Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/c7118392
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/c7118392
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/c7118392

Branch: refs/heads/master
Commit: c71183924683b7bbfae3740dd53daacdb3b62744
Parents: fe3b564
Author: Niketan Pansare <np...@us.ibm.com>
Authored: Fri Jan 15 14:15:01 2016 -0800
Committer: Niketan Pansare <np...@us.ibm.com>
Committed: Fri Jan 15 14:15:01 2016 -0800

----------------------------------------------------------------------
 src/main/java/org/apache/sysml/api/MLContext.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c7118392/src/main/java/org/apache/sysml/api/MLContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/MLContext.java b/src/main/java/org/apache/sysml/api/MLContext.java
index b89121e..154c266 100644
--- a/src/main/java/org/apache/sysml/api/MLContext.java
+++ b/src/main/java/org/apache/sysml/api/MLContext.java
@@ -905,6 +905,12 @@ public class MLContext {
 	public void reset() 
 			throws DMLRuntimeException 
 	{
+		reset(true);
+	}
+	
+	public void reset(boolean cleanupConfig) 
+			throws DMLRuntimeException 
+	{
 		//cleanup variables from bufferpool, incl evicted files 
 		//(otherwise memory leak because bufferpool holds references)
 		CacheableData.cleanupCacheDir();
@@ -913,7 +919,8 @@ public class MLContext {
 		_inVarnames = null;
 		_outVarnames = null;
 		_variables = null;
-		_additionalConfigs.clear();
+		if(cleanupConfig)
+			_additionalConfigs.clear();
 	}
 	
 	/**