File: leanpass/tensor.py
The Tensor.grad_check implementation calls self.zero_grad_all(), but no such method exists in the library (only Module.zero_grad). It also uses self._eval_forward() which is defined later but never returns a value, making the finite‑difference check unusable and raising an AttributeError. This breaks the only built‑in gradient‑checking utility.
Fix: implement a zero_grad method on Tensor (or call the existing one on leaf tensors) and complete _eval_forward to return the forward‑evaluated output values.
Label: bug
Filed automatically by ai-issue-scan.
File:
leanpass/tensor.pyThe
Tensor.grad_checkimplementation callsself.zero_grad_all(), but no such method exists in the library (onlyModule.zero_grad). It also usesself._eval_forward()which is defined later but never returns a value, making the finite‑difference check unusable and raising an AttributeError. This breaks the only built‑in gradient‑checking utility.Fix: implement a
zero_gradmethod onTensor(or call the existing one on leaf tensors) and complete_eval_forwardto return the forward‑evaluated output values.Label: bug
Filed automatically by ai-issue-scan.