我在Windows机器上尝试基本的systemML教程。但是,由于指令适用于OS X和Linux,因此我在实现
时遇到了一些问题例如,在处理我已下载的Habeman数据集并将其作为haberman.data保存在文件夹数据中时所述here我收到此错误
C:\Users\rajarshi.bhadra>cd C:\Users\rajarshi.bhadra\Desktop\systemml-0.13.0-incubating-bin
C:\Users\rajarshi.bhadra\Desktop\systemml-0.13.0-incubating-bin>echo '{"rows": 306, "cols": 4, "format": "csv"}' > data/haberman.data.mtd
C:\Users\rajarshi.bhadra\Desktop\systemml-0.13.0-incubating-bin>echo '1,1,1,2' > data/types.csv
C:\Users\rajarshi.bhadra\Desktop\systemml-0.13.0-incubating-bin>echo '{"rows": 1, "cols": 4, "format": "csv"}' > data/types.csv.mtd
C:\Users\rajarshi.bhadra\Desktop\systemml-0.13.0-incubating-bin>./runStandaloneSystemML.sh scripts/algorithms/Univar-Stats.dml -nvargs X=data/haberman.data TYPES=data/types.csv STATS=data/univarOut.mtx CONSOLE_OUTPUT=TRUE
'.' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\rajarshi.bhadra\Desktop\systemml-0.13.0-incubating-bin>runStandaloneSystemML scripts/algorithms/Univar-Stats.dml -nvargs X=data/haberman.data TYPES=data/types.csv STATS=data/univarOut.mtx CONSOLE_OUTPUT=TRUE
17/03/13 13:33:52 INFO api.DMLScript: BEGIN DML run 03/13/2017 13:33:52
17/03/13 13:33:53 ERROR api.DMLScript: Failed to execute DML script.
org.apache.sysml.parser.LanguageException: ERROR: scripts/algorithms/Univar-Stats.dml -- line 45, column 0 -- error parsing MTD file with path data/haberman.data.mtd: Error parsing json
at org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:551)
at org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:521)
at org.apache.sysml.parser.DataExpression.readMetadataFile(DataExpression.java:2006)
at org.apache.sysml.parser.DataExpression.checkHasMatrixMarketFormat(DataExpression.java:2071)
at org.apache.sysml.parser.DataExpression.validateExpression(DataExpression.java:652)
at org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:567)
at org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:140)
at org.apache.sysml.api.DMLScript.execute(DMLScript.java:586)
at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:346)
at org.apache.sysml.api.DMLScript.main(DMLScript.java:207)
Exception in thread "main" org.apache.sysml.api.DMLException: org.apache.sysml.parser.LanguageException: ERROR: scripts/algorithms/Univar-Stats.dml -- line 45, column 0 -- error parsing MTD file with path data/haberman.data.mtd: Error parsing json
at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:360)
at org.apache.sysml.api.DMLScript.main(DMLScript.java:207)
Caused by: org.apache.sysml.parser.LanguageException: ERROR: scripts/algorithms/Univar-Stats.dml -- line 45, column 0 -- error parsing MTD file with path data/haberman.data.mtd: Error parsing json
at org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:551)
at org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:521)
at org.apache.sysml.parser.DataExpression.readMetadataFile(DataExpression.java:2006)
at org.apache.sysml.parser.DataExpression.checkHasMatrixMarketFormat(DataExpression.java:2071)
at org.apache.sysml.parser.DataExpression.validateExpression(DataExpression.java:652)
at org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:567)
at org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:140)
at org.apache.sysml.api.DMLScript.execute(DMLScript.java:586)
at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:346)
... 1 more
非常感谢任何帮助
答案 0 :(得分:0)
这可能只是data / haberman.data.mtd文件末尾缺少的换行符(因为它在解析此json文件时当前失败)。
如果这没有帮助,这里有一个解决方法:由于SystemML不一定需要ctd输入数据的mtd文件,你也可以删除mtd文件并在Univar的read语句中放入format =“csv” Stats.dml。