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 2017/04/07 18:58:25 UTC

[21/50] [abbrv] incubator-systemml git commit: [SYSTEMML-1230] Add MLContext info functionality to docs

[SYSTEMML-1230] Add MLContext info functionality to docs

Add project info functionality to MLContext Programming Guide.


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

Branch: refs/heads/gh-pages
Commit: cb6f8456feb5dd8b664b2551f7db483075b85cf3
Parents: 7283ddc
Author: Deron Eriksson <de...@us.ibm.com>
Authored: Fri Feb 3 15:02:13 2017 -0800
Committer: Deron Eriksson <de...@us.ibm.com>
Committed: Fri Feb 3 15:02:13 2017 -0800

----------------------------------------------------------------------
 spark-mlcontext-programming-guide.md | 47 +++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/cb6f8456/spark-mlcontext-programming-guide.md
----------------------------------------------------------------------
diff --git a/spark-mlcontext-programming-guide.md b/spark-mlcontext-programming-guide.md
index 8c0a79f..45c0091 100644
--- a/spark-mlcontext-programming-guide.md
+++ b/spark-mlcontext-programming-guide.md
@@ -1636,6 +1636,53 @@ scala> for (i <- 1 to 5) {
 
 </div>
 
+
+## Project Information
+
+SystemML project information such as version and build time can be obtained through the
+MLContext API. The project version can be obtained by `ml.version`. The build time can
+be obtained by `ml.buildTime`. The contents of the project manifest can be displayed
+using `ml.info`. Individual properties can be obtained using the `ml.info.property`
+method, as shown below.
+
+<div class="codetabs">
+
+<div data-lang="Scala" markdown="1">
+{% highlight scala %}
+print(ml.version)
+print(ml.buildTime)
+print(ml.info)
+print(ml.info.property("Main-Class"))
+{% endhighlight %}
+</div>
+
+<div data-lang="Spark Shell" markdown="1">
+{% highlight scala %}
+scala> print(ml.version)
+0.13.0-incubating-SNAPSHOT
+scala> print(ml.buildTime)
+2017-02-03 22:32:43 UTC
+scala> print(ml.info)
+Archiver-Version: Plexus Archiver
+Artifact-Id: systemml
+Build-Jdk: 1.8.0_60
+Build-Time: 2017-02-03 22:32:43 UTC
+Built-By: deroneriksson
+Created-By: Apache Maven 3.3.9
+Group-Id: org.apache.systemml
+Main-Class: org.apache.sysml.api.DMLScript
+Manifest-Version: 1.0
+Version: 0.13.0-incubating-SNAPSHOT
+
+scala> print(ml.info.property("Main-Class"))
+org.apache.sysml.api.DMLScript
+
+{% endhighlight %}
+</div>
+
+</div>
+
+
 ---
 
 # Jupyter (PySpark) Notebook Example - Poisson Nonnegative Matrix Factorization