fix: sum() over a dimension crashes when a sibling dimension is empty - #907
fix: sum() over a dimension crashes when a sibling dimension is empty#907FBumann wants to merge 4 commits into
Conversation
Build cost — v1 vs legacyv1 build peak & time relative to legacy, on this commit — not a comparison against master (that is CodSpeed).
Full table (time + peak, mean)📊 Interactive plots + CSV: download the semantics-report-v1-vs-legacy artifact from this run. Report-only · not a gate · refreshed on every push · obsolete once legacy is dropped. |
Merging this PR will regress 4 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | test_to_lp[milp-n=50] |
2 MB | 2.6 MB | -23.36% |
| ❌ | Memory | test_to_lp[nodal_balance-severity=50] |
2.8 MB | 3.3 MB | -15.08% |
| ❌ | Memory | test_to_lp[rolling-severity=0] |
2.7 MB | 3.1 MB | -12.55% |
| ❌ | Memory | test_to_lp[nodal_balance-severity=0] |
3.3 MB | 3.7 MB | -10.29% |
| ⚡ | Memory | test_to_lp[knapsack-n=10000] |
2.8 MB | 2.2 MB | +26.3% |
| ⚡ | Memory | test_to_lp[cumsum-severity=100] |
208.7 MB | 172 MB | +21.37% |
| ⚡ | Memory | test_to_lp[storage-n=250] |
35.4 MB | 29.6 MB | +19.68% |
| ⚡ | Memory | test_to_lp[rolling-severity=50] |
429.7 MB | 367.7 MB | +16.88% |
| ⚡ | Memory | test_to_lp[storage-n=10] |
2.9 MB | 2.6 MB | +10.79% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/sum-empty-sibling-dim (3f2c50a) with master (09c34dd)2
Footnotes
-
175 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
master(570ff2e) during the generation of this report, so 09c34dd was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
f64b8a0 to
f90d3d9
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
f90d3d9 to
ffc6bb5
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ffc6bb5 to
653160d
Compare
Closes #906.
Note
The following content was generated by AI.
Dataset.stackreshapes with an inferred-1, which numpy cannot resolve once the array has zero elements — e.g.x.sum('line')whenxalso carries an emptycycledimension. An empty expression has no terms, so it is now stacked onto a_termdimension of size 0, consistent withx.sum('cycle')andLinearExpression.from_constant(...)over the kept coordinates.Three commits, best reviewed one by one:
_stack_into_term_dimfromBaseExpression._sum(no behaviour change)_stack_into_term_dim, un-xfail, release note🤖 Generated with Claude Code