Repository: incubator-systemml Updated Branches: refs/heads/gh-pages b537736c3 -> d2a048d72
[SYSTEMML-836] ScriptFactory classpath resource convenience methods Closes #207. Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/d2a048d7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/d2a048d7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/d2a048d7 Branch: refs/heads/gh-pages Commit: d2a048d7236d20f7b671fd0d0119ad9d27a2520b Parents: b537736 Author: Deron Eriksson <[email protected]> Authored: Thu Aug 11 12:39:13 2016 -0700 Committer: Deron Eriksson <[email protected]> Committed: Thu Aug 11 12:39:13 2016 -0700 ---------------------------------------------------------------------- spark-mlcontext-programming-guide.md | 11 +++++++++++ 1 file changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d2a048d7/spark-mlcontext-programming-guide.md ---------------------------------------------------------------------- diff --git a/spark-mlcontext-programming-guide.md b/spark-mlcontext-programming-guide.md index 6c2d2af..2f77347 100644 --- a/spark-mlcontext-programming-guide.md +++ b/spark-mlcontext-programming-guide.md @@ -1150,6 +1150,17 @@ val s5 = ScriptFactory.dmlFromInputStream(inputStream) {% endhighlight %} +**Script from Resource:** + +As mentioned, the SystemML jar file contains all the primary algorithm script files. For convenience, we can +read these script files or other script files on the classpath using ScriptFactory's `dmlFromResource` and `pydmlFromResource` +methods. + +{% highlight scala %} +val s6 = ScriptFactory.dmlFromResource("/scripts/algorithms/Univar-Stats.dml"); +{% endhighlight %} + + ## ScriptExecutor A Script is executed by a ScriptExecutor. If no ScriptExecutor is specified, a default ScriptExecutor will
