From bb90c552c55e452d8b1a8787241fefaadb5113ec Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Mon, 15 May 2017 18:24:45 -0400 Subject: [PATCH 1/2] add version info in MLContext --- .../org/apache/sysml/api/mlcontext/MLContextUtil.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 c4314bf3326..6417ab6ca2c 100644 --- a/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java +++ b/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java @@ -974,8 +974,15 @@ public static String displayOutputs(Set outputNames, LocalVariableMap sy * @return the SystemML welcome message */ public static String welcomeMessage() { - StringBuilder sb = new StringBuilder(); - sb.append("\nWelcome to Apache SystemML!\n"); + StringBuilder sb = new StringBuilder(); + sb.append("\nWelcome to Apache SystemML!\n Version "); + try { + ProjectInfo info = ProjectInfo.getProjectInfo(); + if (info.version() != null) { + sb.append(info.version()); + } + } catch (MLContextException e) { + } return sb.toString(); } From 13b3565cb3e54791c39f33270b2b5c6af22618e4 Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Mon, 15 May 2017 19:07:21 -0400 Subject: [PATCH 2/2] fix version string --- .../java/org/apache/sysml/api/mlcontext/MLContextUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 6417ab6ca2c..d5b48bcc19f 100644 --- a/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java +++ b/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java @@ -975,10 +975,11 @@ public static String displayOutputs(Set outputNames, LocalVariableMap sy */ public static String welcomeMessage() { StringBuilder sb = new StringBuilder(); - sb.append("\nWelcome to Apache SystemML!\n Version "); + sb.append("\nWelcome to Apache SystemML!\n"); try { ProjectInfo info = ProjectInfo.getProjectInfo(); if (info.version() != null) { + sb.append("Version "); sb.append(info.version()); } } catch (MLContextException e) {