You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemds.apache.org by "ReneEnjilian (via GitHub)" <gi...@apache.org> on 2025/01/13 22:57:38 UTC
[PR] Printing matrix without toString() [systemds]
ReneEnjilian opened a new pull request, #2180:
URL: https://github.com/apache/systemds/pull/2180
This patch enables the DML to print matrices and other datatypes (frame, list) without using the toString() method.
Previously, printing a matrix A required: `print(toString(A))`.
Now, printing can be done via: `print(A)`.
The same applies to frames and lists. However, there are some remaining issues when datastructures are used with indexing. For example, while `A[1,]` is also a matrix (first row of A), `print(A[1,])` will not print the correct output (first row) but rather only the first element of the first row. Internally, the compiler misinterprets the matrix as a scalar and does not propagate the correct size information. The propagated size information on the rewrite-level are (-1 x -1), meaning unknown. A work-around would be either to still use the `toString` method or, as shown in the test cases, to materialize the slicing before printing: `B=A[1,]` , `print(B)`.
Similar problems exist with lists and frames but can be addressed by materializing the slicing/indexing outside the print as shown in the previous example. A future task should address this issue.
I promoted the rewrite from RewriteAlgebraicSimplificationStatic to having a separate class in the rewrite directory as discussed. Testing has been added.
--
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] Printing matrix without toString() [systemds]
Posted by "ReneEnjilian (via GitHub)" <gi...@apache.org>.
ReneEnjilian commented on PR #2180:
URL: https://github.com/apache/systemds/pull/2180#issuecomment-2593018128
All checks fail. The error message for all of the 44 failing checks is something like:
Error: fatal: unable to access 'https://github.com/apache/systemds/': The requested URL returned error: 502
Can I assume that this issue is unrelated to my pushed code ?
--
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] Printing matrix without toString() [systemds]
Posted by "mboehm7 (via GitHub)" <gi...@apache.org>.
mboehm7 commented on PR #2180:
URL: https://github.com/apache/systemds/pull/2180#issuecomment-2599670548
LGTM - Thanks for the patch @ReneEnjilian. During the merge, I moved the rewrite to static rewrites (in program rewriter), fixed the failing test, and removed commented code.
--
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] Printing matrix without toString() [systemds]
Posted by "mboehm7 (via GitHub)" <gi...@apache.org>.
mboehm7 closed pull request #2180: Printing matrix without toString()
URL: https://github.com/apache/systemds/pull/2180
--
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] Printing matrix without toString() [systemds]
Posted by "mboehm7 (via GitHub)" <gi...@apache.org>.
mboehm7 commented on PR #2180:
URL: https://github.com/apache/systemds/pull/2180#issuecomment-2593343296
Yes, that seems to be an external issue, but the missing license header (failed license check) is real, and once you made this change we get another run of the tests.
--
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