shieru1214 commented on PR #2615:
URL: https://github.com/apache/systemds/pull/2615#issuecomment-6486896736

   This change adds 12 tests for representation_dag.py, covering DAG 
validation, construction, execution, and helper functions. 
   
   ### DAG Validation
   
   I added tests for `validate()`. A connected DAG should pass, while an empty 
DAG, a missing root, a reference to an input that does not exist, a cycle, and 
a self-loop should all fail. I also check that a node not connected to the root 
is removed when the DAG is created. These tests make the expected behaviour for 
incomplete DAGs more explicit.
   
   ### DAG Construction
   
   This part covers both `RepresentationDAGBuilder` and `CSEAwareDAGBuilder`. I 
check that neither builder accepts a root that does not exist. For the CSE 
builder, I test when nodes should be reused: the same input, operator, and 
`window_size` give the same node, but changing `window_size` from 2 to 4 gives 
a different one. I also check that building the same root again returns the 
same DAG object, while giving it a new `dag_id` creates a new DAG object.
   
   ### DAG Execution
   
   I run a small DAG where one modality goes through `WindowAggregation` and is 
then combined with another modality using `Concatenation`. The test checks that 
the root returns a `TransformedModality` with shape `(6, 6)`. Two other tests 
check that a fusion operator needing training cannot run directly through 
`execute()`, and that the node cache stores only the intermediate node. On the 
second run, that node is not stored again. These tests check the execution path 
and cache behaviour, but do not compare the output values.
   
   ### Helper Functions
   
   The modality lookup test checks that it returns the requested object when 
several objects share a `modality_id`, and returns `None` when the ID is 
missing. The pushdown parameter test checks that an aggregation object is 
created only when `_pushdown_aggregation` is present. Finally, I check that 
`pushdown_aggregation` leaves the nodes and their connections unchanged when 
`WindowAggregation` does not support pushdown. These tests do not check the 
numerical result of aggregation.


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to