File: leanpass/tensor.py
Unary operations (exp, log, sigmoid, softmax) pass the predecessor as a set {self} to _create_child, while binary ops use a tuple (self, other). The rest of the library (graph traversal, topological sorting, and any(node.requires_grad for node in prev)) expects an ordered iterable. Using a mutable set can lead to nondeterministic ordering and potential errors when the set is later mutated.
Fix: always pass a tuple (e.g., (self,)) for consistency.
Label: bug
Filed automatically by ai-issue-scan.
File:
leanpass/tensor.pyUnary operations (
exp,log,sigmoid,softmax) pass the predecessor as a set{self}to_create_child, while binary ops use a tuple(self, other). The rest of the library (graph traversal, topological sorting, andany(node.requires_grad for node in prev)) expects an ordered iterable. Using a mutable set can lead to nondeterministic ordering and potential errors when the set is later mutated.Fix: always pass a tuple (e.g.,
(self,)) for consistency.Label: bug
Filed automatically by ai-issue-scan.