0

我正在我的 Windows 机器上试用基本的 systemML 教程。但是,由于这些说明适用于 OS X 和 linux,因此我在实施时遇到了一些问题

例如,在使用我已下载并保存在文件夹数据中的 Habeman 数据集时,如此处所述我收到此错误

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

任何帮助将不胜感激

4

1 回答 1

0

这可能只是 data/haberman.data.mtd 文件末尾缺少的换行符(因为它当前在解析此 json 文件时失败)。

如果这没有帮助,这里有一个解决方法:由于 SystemML 不一定需要 mtd 文件来存储 csv 输入数据,您也可以删除 mtd 文件并在 Univar-Stats.dml 的读取语句中放置一个 format="csv" .

于 2017-03-17T00:07:13.493 回答