You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ss...@apache.org on 2022/08/19 19:03:50 UTC

[systemds] branch main updated: [MINOR] Cleanups in builtin scripts (i.e., formatting & removal of print statements)

This is an automated email from the ASF dual-hosted git repository.

ssiddiqi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/main by this push:
     new f45dea0963 [MINOR] Cleanups in builtin scripts (i.e., formatting & removal of print statements)
f45dea0963 is described below

commit f45dea0963cfd190e289875aca68ab628af3deb9
Author: Shafaq Siddiqi <sh...@tugraz.at>
AuthorDate: Fri Aug 19 21:02:49 2022 +0200

    [MINOR] Cleanups in builtin scripts (i.e., formatting & removal of print statements)
---
 scripts/builtin/bandit.dml                                          | 2 +-
 scripts/builtin/executePipeline.dml                                 | 6 ++----
 scripts/builtin/outlierByIQR.dml                                    | 5 -----
 .../instructions/spark/ParameterizedBuiltinSPInstruction.java       | 2 --
 4 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/scripts/builtin/bandit.dml b/scripts/builtin/bandit.dml
index d27a7d1058..075890740c 100644
--- a/scripts/builtin/bandit.dml
+++ b/scripts/builtin/bandit.dml
@@ -85,7 +85,7 @@ m_bandit = function(Matrix[Double] X_train, Matrix[Double] Y_train, Matrix[Doubl
   B = (s_max + 1) * R;
   s_max = s_max - 1
   idx = 1
-  for(s in s_max:0, check = 0) { # TODO convert to parfor
+  for(s in s_max:0) {
     
    # result variables
     bracket_hp = matrix(0, rows=k*(s+1)+k, cols=HYPERPARAM_LENGTH)
diff --git a/scripts/builtin/executePipeline.dml b/scripts/builtin/executePipeline.dml
index a9cd918bc2..06e9132cba 100644
--- a/scripts/builtin/executePipeline.dml
+++ b/scripts/builtin/executePipeline.dml
@@ -403,9 +403,6 @@ return (Matrix[Double] X, Matrix[Double] Y)
       Y = XY[, 1]
       X = XY[, 2:ncol(XY)]
     }
-    else {
-      str = "smote not applicable"
-    }
   }
 }
 
@@ -435,7 +432,8 @@ return(Matrix[Double] X){
   X = X + Mask
 }
 
-storeDataForPrunning = function(Frame[Unknown] pipeline, Matrix[Double] hp, Matrix[Double] hpForPruning, Matrix[Double] changesByOp, Integer changes, Integer i)
+storeDataForPrunning = function(Frame[Unknown] pipeline, Matrix[Double] hp, Matrix[Double] hpForPruning, 
+  Matrix[Double] changesByOp, Integer changes, Integer i)
 return(Matrix[Double] hpForPruning, Matrix[Double] changesByOp)
 {
   if(ncol(hpForPruning) > 1) {
diff --git a/scripts/builtin/outlierByIQR.dml b/scripts/builtin/outlierByIQR.dml
index bd15bb0f65..a564e0b746 100644
--- a/scripts/builtin/outlierByIQR.dml
+++ b/scripts/builtin/outlierByIQR.dml
@@ -42,7 +42,6 @@
 m_outlierByIQR = function(Matrix[Double] X, Double k =1.5, Integer repairMethod = 1, 
   Integer max_iterations, Boolean verbose = TRUE) 
   return(Matrix[Double] Y, Matrix[Double] Q1, Matrix[Double] Q3, Matrix[Double] IQR, Double k, Integer repairMethod) 
-  # return(List[Unknown] out)
 {
 
   sumPrevious = as.double(0)
@@ -71,16 +70,12 @@ m_outlierByIQR = function(Matrix[Double] X, Double k =1.5, Integer repairMethod
   Y = X
 
   if(verbose) {
-    print("Total executed iterations = "+counter)
     print("Upper-bound of data was calculated using Q3 + k * IQR")
     print("lower-bound of data was calculated using Q3 - k * IQR")
     print("Anything less than the lower-bound and greater than the upper-bound was treated as outlier")
     if(sum(Y) == 0)
       print("output is a zero matrix due to iterative evaluation of outliers ")
-    print("output:\n"+ toString(Y))
   }
-  bounds = rbind(lowerBound, upperBound)
-  out = list(Y, bounds)
 }
   
 fix_outliers_iqr = function(Matrix[Double] X, Matrix[Double] outlierFilter, Integer repairMethod = 1)
diff --git a/src/main/java/org/apache/sysds/runtime/instructions/spark/ParameterizedBuiltinSPInstruction.java b/src/main/java/org/apache/sysds/runtime/instructions/spark/ParameterizedBuiltinSPInstruction.java
index 7bb547673c..7135f141c6 100644
--- a/src/main/java/org/apache/sysds/runtime/instructions/spark/ParameterizedBuiltinSPInstruction.java
+++ b/src/main/java/org/apache/sysds/runtime/instructions/spark/ParameterizedBuiltinSPInstruction.java
@@ -686,8 +686,6 @@ public class ParameterizedBuiltinSPInstruction extends ComputationSPInstruction
 					_off.getBlock(1, (int) arg0._1().getColumnIndex()));
 
 			// execute remove empty operations
-			System.out.println("offset: "+offsets.getValue().getNumRows());
-			System.out.println("_rmRows: "+_rmRows);
 			ArrayList<IndexedMatrixValue> out = new ArrayList<>();
 			LibMatrixReorg.rmempty(data, offsets, _rmRows, _len, _blen, out);