You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemds.apache.org by "philipportner (via GitHub)" <gi...@apache.org> on 2025/07/07 19:37:41 UTC
[PR] [SYSTEMDS-3708] Fix permutation-matrix method [systemds]
philipportner opened a new pull request, #2288:
URL: https://github.com/apache/systemds/pull/2288
Adds a test case with inputs that have multiple groups with varying row counts.
This pattern comes from a `lineorder.csv` example dataset that currently causes a runtime exception for the `permutation-matrix` approach but works for the `nested-loop` approach.
Why this happened:
- `permutation-matrix` approach allocated space assuming every group has `maxRowsInGroup` rows
- groups may have variable sizes resulting in `Y_temp_reduce` having fewer rows than the reshape expects
Changes:
- correctly pads the matrix in when groups do not all have `maxRowsInGroup` rows
- adds testcases that cover this pattern
To reproduce original crash:
`lineorder.csv`:
```
0,1,2,3,4
1.0,1.0,18238.0,155190.0,828.0
1.0,2.0,18238.0,67310.0,163.0
1.0,3.0,18238.0,63700.0,71.0
1.0,4.0,18238.0,2132.0,943.0
2.0,1.0,20612.0,106170.0,1066.0
2.0,2.0,20612.0,194509.0,602.0
2.0,3.0,20612.0,100164.0,138.0
2.0,4.0,20612.0,45803.0,1382.0
2.0,5.0,20612.0,4439.0,1684.0
3.0,1.0,13813.0,4297.0,1959.0
```
`crash.dml`:
```
path_to_lineorder = "lineorder.csv"
X = read(path_to_lineorder, format = "csv", header=TRUE, sep = ",")
source("./scripts/builtin/raGroupby.dml") as ra_new
Y = ra_new::m_raGroupby(X, 2, "nested-loop")
print(toString(Y)) # nested-loop works
Y = ra_new::m_raGroupby(X, 2, "permutation-matrix")
print(toString(Y)) # permutation-matrix breaks
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [SYSTEMDS-3708] Fix permutation-matrix method [systemds]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #2288:
URL: https://github.com/apache/systemds/pull/2288#issuecomment-3046387085
## [Codecov](https://app.codecov.io/gh/apache/systemds/pull/2288?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 72.94%. Comparing base [(`64455b9`)](https://app.codecov.io/gh/apache/systemds/commit/64455b9f229238b77e518bc3bb4fc34b547300a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`0713342`)](https://app.codecov.io/gh/apache/systemds/commit/07133428b94c42047084d2d4d8597dab0776128a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #2288 +/- ##
============================================
- Coverage 72.96% 72.94% -0.02%
+ Complexity 46097 46088 -9
============================================
Files 1479 1479
Lines 172654 172654
Branches 33796 33796
============================================
- Hits 125970 125947 -23
- Misses 37192 37213 +21
- Partials 9492 9494 +2
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/systemds/pull/2288?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [SYSTEMDS-3708] Fix permutation-matrix method [systemds]
Posted by "mboehm7 (via GitHub)" <gi...@apache.org>.
mboehm7 commented on PR #2288:
URL: https://github.com/apache/systemds/pull/2288#issuecomment-3048197296
LGTM - thanks for the patch @philipportner. I'll merge it in as is, but the padding might be done more efficiently directly during the creation of the permutation matrix as table() supports padding (I'll think about it, but quick tries were unsuccessful) and note that builtin functions can be called without imports (here raGroupby instead of m_raGroupby).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [SYSTEMDS-3708] Fix permutation-matrix method [systemds]
Posted by "mboehm7 (via GitHub)" <gi...@apache.org>.
mboehm7 closed pull request #2288: [SYSTEMDS-3708] Fix permutation-matrix method
URL: https://github.com/apache/systemds/pull/2288
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org