`Tensor.sum` backward fails for multi‑axis reductions
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- numpy, python
- Domain
- machine-learning
Research direction
Start in leanpass/tensor.py and read the backward function for sum, especially how it handles the axis argument. Reproduce the failure with a multi-axis reduction such as axis=(0,2), then check the resulting gradient against the expected shape and values; done means tuple axes backpropagate without raising a TypeError.
Written by the indexing model from the issue text.
Description
File: leanpass/tensor.py
The backward function for sum only handles a single axis (np.expand_dims(grad, axis=axis)). When axis is a tuple (e.g., axis=(0,2)) the code raises a TypeError because expand_dims expects an int. This breaks common use‑cases of summing over multiple dimensions.
Filed automatically by ai-issue-scan.
- Dominant language
- Python
- Stars
- 16
- Forks
- 1
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Terminay/leanpass
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
performance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 88/100
All issues in Terminay/leanpass
Similar issues
-
[Bug] Unit tests reach real Bedrock call paths without patching the modelPossibly taken @proton0210 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
aws-samples/sample-aws-genai-db-modernizer#1318 · 1 comment ·
Maintainers usually reply within 1 day
-
pyarrow-25.0.1-cp310-cp310-manylinux_2_28_x86_64.whl: 1 vulnerabilities (highest severity is: 5.3)OpenMend: dependency security vulnerability
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
capitalone/locopy#394 ·
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextOpenbug javascript
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ietf-tools/datatracker#11922 · 1 comment ·
Maintainers usually reply within 1 day