File: leanpass/tensor.py
The grad_check utility calls self.zero_grad_all(), but the Tensor class only defines zero_grad. This results in an AttributeError when the gradient checker is used, breaking a common debugging workflow.
Fix: replace the call with self.zero_grad() (or implement zero_grad_all to recursively zero gradients of all leaf tensors).
Filed automatically by ai-issue-scan.
File:
leanpass/tensor.pyThe
grad_checkutility callsself.zero_grad_all(), but theTensorclass only defineszero_grad. This results in anAttributeErrorwhen the gradient checker is used, breaking a common debugging workflow.Fix: replace the call with
self.zero_grad()(or implementzero_grad_allto recursively zero gradients of all leaf tensors).Filed automatically by ai-issue-scan.