You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemds.apache.org by GitBox <gi...@apache.org> on 2021/06/01 11:43:31 UTC

[GitHub] [systemds] Baunsgaard commented on a change in pull request #1270: [WIP][Python] Create a List Class with multiple outputs and allow it to be part of the DAG

Baunsgaard commented on a change in pull request #1270:
URL: https://github.com/apache/systemds/pull/1270#discussion_r643025563



##########
File path: src/main/python/systemds/script_building/dag.py
##########
@@ -74,12 +74,13 @@ class DAGNode(ABC):
     sds_context: 'SystemDSContext'
     _unnamed_input_nodes: Sequence[Union['DAGNode', str, int, float, bool]]
     _named_input_nodes: Dict[str, Union['DAGNode', str, int, float, bool]]
+    _named_output_nodes: Dict[str, Union['DAGNode', str, int, float, bool]]

Review comment:
       Maybe my comment was not clear.
   
   The issue is that the list can only be name or number based output nodes, not both. Therefore making two constructors enforce this design, one that specify a output list length and one with a list of names. That is why my first comment says hide it away, because with the previous design, one could access both arguments, and the implementation therefore have to throw an error if both arguments are given.
   If you make two constructors then no exception handling is needed because wrong arguments can not happen.
   
   I will change the API appropriately while merging, so no need to change anything.




-- 
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:
users@infra.apache.org