You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code fails with the following exception: ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
This is because the test for equality is not defined for DataFrame objects. As a result, the nodes resulting in a loop are not removed and the tree is invalid.
The following is the test case that fails:
tree = Tree()
tree.condition(output=Action(value=100), condition="SubA")
tree.condition(output=Action(value=200), condition="SubB")
try:
tree.include_subtree(tree)
except Exception as e:
print(e)
The text was updated successfully, but these errors were encountered:
MogomotsiFM
changed the title
Bug fix: Removing nodes that create a loop in the tree fails.
Bug fix: Failure to remove nodes that create a loop in the tree.
Oct 22, 2024
MogomotsiFM
changed the title
Bug fix: Failure to remove nodes that create a loop in the tree.
Bug fix: Failure to remove nodes that introduce a loop in the tree.
Oct 28, 2024
The code fails with the following exception: ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
This is because the test for equality is not defined for DataFrame objects. As a result, the nodes resulting in a loop are not removed and the tree is invalid.
The following is the test case that fails:
To solve this, we note that the addresses of nodes are used to detect loops. As a result, we use these addresses to select nodes that must be removed. The proposed solution is at this branch: https://github.com/MogomotsiFM/dsp-decision-engine/tree/loop-causes
The text was updated successfully, but these errors were encountered: