You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by de...@apache.org on 2016/09/16 18:48:04 UTC
incubator-systemml git commit: [SYSTEMML-835] Remove validation
warnings for MLContext
Repository: incubator-systemml
Updated Branches:
refs/heads/master 6758f9034 -> b2f3fd8e0
[SYSTEMML-835] Remove validation warnings for MLContext
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/b2f3fd8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/b2f3fd8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/b2f3fd8e
Branch: refs/heads/master
Commit: b2f3fd8e09f2768e468ef5135179156608203fb2
Parents: 6758f90
Author: Deron Eriksson <de...@us.ibm.com>
Authored: Fri Sep 16 11:24:31 2016 -0700
Committer: Deron Eriksson <de...@us.ibm.com>
Committed: Fri Sep 16 11:24:31 2016 -0700
----------------------------------------------------------------------
src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java | 1 +
src/main/java/org/apache/sysml/conf/CompilerConfig.java | 2 ++
.../java/org/apache/sysml/parser/dml/DmlSyntacticValidator.java | 4 +++-
.../org/apache/sysml/parser/pydml/PydmlSyntacticValidator.java | 4 +++-
4 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/b2f3fd8e/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java b/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
index 5ee0e3a..96fde52 100644
--- a/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
+++ b/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
@@ -197,6 +197,7 @@ public final class MLContextUtil {
compilerConfig.set(ConfigType.IGNORE_UNSPECIFIED_ARGS, true);
compilerConfig.set(ConfigType.REJECT_READ_WRITE_UNKNOWNS, false);
compilerConfig.set(ConfigType.ALLOW_CSE_PERSISTENT_READS, false);
+ compilerConfig.set(ConfigType.MLCONTEXT, true);
ConfigurationManager.setGlobalConfig(compilerConfig);
}
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/b2f3fd8e/src/main/java/org/apache/sysml/conf/CompilerConfig.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/conf/CompilerConfig.java b/src/main/java/org/apache/sysml/conf/CompilerConfig.java
index 77c53ea..b0c8d15 100644
--- a/src/main/java/org/apache/sysml/conf/CompilerConfig.java
+++ b/src/main/java/org/apache/sysml/conf/CompilerConfig.java
@@ -71,6 +71,7 @@ public class CompilerConfig
//data on mlcontext (local) /jmlc (global); ignore unknowns on jmlc
IGNORE_READ_WRITE_METADATA, // global skip meta data reads
REJECT_READ_WRITE_UNKNOWNS, // ignore missing meta data
+ MLCONTEXT // execution via new MLContext
}
//default flags (exposed for testing purposes only)
@@ -96,6 +97,7 @@ public class CompilerConfig
_bmap.put(ConfigType.IGNORE_UNSPECIFIED_ARGS, false);
_bmap.put(ConfigType.IGNORE_READ_WRITE_METADATA, false);
_bmap.put(ConfigType.REJECT_READ_WRITE_UNKNOWNS, true);
+ _bmap.put(ConfigType.MLCONTEXT, false);
_imap = new HashMap<CompilerConfig.ConfigType, Integer>();
_imap.put(ConfigType.BLOCK_SIZE, OptimizerUtils.DEFAULT_BLOCKSIZE);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/b2f3fd8e/src/main/java/org/apache/sysml/parser/dml/DmlSyntacticValidator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/dml/DmlSyntacticValidator.java b/src/main/java/org/apache/sysml/parser/dml/DmlSyntacticValidator.java
index ca8728e..07e0705 100644
--- a/src/main/java/org/apache/sysml/parser/dml/DmlSyntacticValidator.java
+++ b/src/main/java/org/apache/sysml/parser/dml/DmlSyntacticValidator.java
@@ -362,7 +362,9 @@ public class DmlSyntacticValidator extends CommonSyntacticValidator implements D
+ "through commandline or initialized to default value.";
if( ConfigurationManager.getCompilerConfigFlag(ConfigType.IGNORE_UNSPECIFIED_ARGS) ) {
ctx.dataInfo.expr = getConstIdFromString(" ", ctx.start);
- raiseWarning(msg, ctx.start);
+ if (!ConfigurationManager.getCompilerConfigFlag(ConfigType.MLCONTEXT)) {
+ raiseWarning(msg, ctx.start);
+ }
}
else {
notifyErrorListeners(msg, ctx.start);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/b2f3fd8e/src/main/java/org/apache/sysml/parser/pydml/PydmlSyntacticValidator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/pydml/PydmlSyntacticValidator.java b/src/main/java/org/apache/sysml/parser/pydml/PydmlSyntacticValidator.java
index e3015c1..c605308 100644
--- a/src/main/java/org/apache/sysml/parser/pydml/PydmlSyntacticValidator.java
+++ b/src/main/java/org/apache/sysml/parser/pydml/PydmlSyntacticValidator.java
@@ -480,7 +480,9 @@ public class PydmlSyntacticValidator extends CommonSyntacticValidator implements
+ "through commandline or initialized to default value.";
if( ConfigurationManager.getCompilerConfigFlag(ConfigType.IGNORE_UNSPECIFIED_ARGS) ) {
ctx.dataInfo.expr = getConstIdFromString(" ", ctx.start);
- raiseWarning(msg, ctx.start);
+ if (!ConfigurationManager.getCompilerConfigFlag(ConfigType.MLCONTEXT)) {
+ raiseWarning(msg, ctx.start);
+ }
}
else {
notifyErrorListeners(msg, ctx.start);