kev-inn commented on a change in pull request #1065:
URL: https://github.com/apache/systemds/pull/1065#discussion_r495004428



##########
File path: src/main/python/systemds/script_building/dag.py
##########
@@ -96,3 +96,7 @@ def is_python_local_data(self):
     @property
     def number_of_outputs(self):
         return self._number_of_outputs
+
+    @property
+    def output_type(self):
+        return self._output_type

Review comment:
       EOL
   

##########
File path: src/main/python/systemds/script_building/script.py
##########
@@ -140,15 +140,18 @@ def build_code(self, dag_root: DAGNode) -> None:
         :param dag_root: the topmost operation of our DAG, result of operation 
will be output
         """
         baseOutVarString = self._dfs_dag_nodes(dag_root)
-        if(dag_root.number_of_outputs > 1):
-            self.out_var_name = []
-            for idx in range(dag_root.number_of_outputs):
-                self.add_code(
-                    f'write({baseOutVarString}_{idx}, \'./tmp_{idx}\');')
-                self.out_var_name.append(f'{baseOutVarString}_{idx}')
-        else:
-            self.out_var_name.append(baseOutVarString)
-            self.add_code(f'write({baseOutVarString}, \'./tmp\');')
+        if(dag_root.output_type != OutputType.NONE):
+            if(dag_root.number_of_outputs > 1):
+                self.out_var_name = []
+                for idx in range(dag_root.number_of_outputs):
+                    self.add_code(
+                        f'write({baseOutVarString}_{idx}, \'./tmp_{idx}\');')
+                    self.out_var_name.append(f'{baseOutVarString}_{idx}')
+            else:
+                self.out_var_name.append(baseOutVarString)
+                self.add_code(f'write({baseOutVarString}, \'./tmp\');')
+        # else:
+            # self.add_code(baseOutVarString)

Review comment:
       remove?

##########
File path: src/main/python/tests/examples/tutorials/test_mnist.py
##########
@@ -84,6 +84,11 @@ def test_multi_log_reg(self):
 
         self.assertGreater(acc, 80)
 
+    # def test_write_to_binary(self):
+    #     X = Matrix(self.sds, self.d.get_train_data().reshape(
+    #         (60000, 28*28)))
+    #     
X.write("systemds/examples/tutorials/mnist/sysds_mnist_binary").compute()
+

Review comment:
       Remove?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to