Project: S3779 LZW ColGroup | ASML - #2560
Conversation
…nd downstream CLA operations
|
Your code does not build (see error logs). Could you please fix those issues to have a prototype that compiles? |
|
@MasterBrain2000 @m-ollka @Mancer1 could you please address the issues causing the tests to fail? Thanks |
|
@janniklinde, all the build problems have been addressed. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2560 +/- ##
============================================
- Coverage 71.61% 71.52% -0.10%
- Complexity 50132 50650 +518
============================================
Files 1614 1631 +17
Lines 193986 196297 +2311
Branches 37935 38267 +332
============================================
+ Hits 138925 140396 +1471
- Misses 44155 44899 +744
- Partials 10906 11002 +96 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@janniklinde, How much code coverage is accepted? We have some null functions that are required to be implemented but never called. |
|
Generally, all functions that are expected to provide a working implementation should be tested, @Mancer1. Coverage also includes nested function calls, so you should be able to achieve high coverage by testing the publicly available functions of the compressed column group. Please use the tests for existing Also, please avoid reimplementing helper functionality that is already available in the test utilities, such as random matrix generation. |
…o improve coverage
# Conflicts: # src/main/java/org/apache/sysds/runtime/compress/colgroup/ColGroupPiecewiseLinearCompressed.java # src/test/java/org/apache/sysds/test/component/compress/colgroup/ColGroupPiecewiseLinearCompressedOperationsTest.java
|
@janniklinde, we have improved the coverage to 95%. I hope that suffices |
|
@janniklinde, we have already reformatted our files that we edited. The files that java Codestyle check is showing to reformat are those not part of our PR. rice@Arnor:~/MasterBrain2000-Project-S3779-LZW-ColGroup$ dev/format-changed.sh
All PR-edited Java lines are correctly formatted.
rice@Arnor:~/MasterBrain2000-Project-S3779-LZW-ColGroup$ git status
On branch main
Your branch is up to date with 'origin/main'.So, should we leave it be, since we were working on a stale version of main? |
|
You can simply run the following @Mancer1: |
@janniklinde, I believe I tried it before. It didn't affect anything. rice@Arnor:~/MasterBrain2000-Project-S3779-LZW-ColGroup$ git fetch upstream
dev/format-changed.sh upstream/main
remote: Enumerating objects: 299, done.
remote: Counting objects: 100% (172/172), done.
remote: Compressing objects: 100% (90/90), done.
remote: Total 299 (delta 105), reused 82 (delta 82), pack-reused 127 (from 2)
Receiving objects: 100% (299/299), 262.07 KiB | 507.00 KiB/s, done.
Resolving deltas: 100% (122/122), completed with 16 local objects.
From https://github.com/apache/systemds
* [new branch] dependabot/github_actions/docker/login-action-4.6.0 -> upstream/dependabot/github_actions/docker/login-action-4.6.0
7a0e5ca0ac..9dccbc3e60 main -> upstream/main
All PR-edited Java lines are correctly formatted.
rice@Arnor:~/MasterBrain2000-Project-S3779-LZW-ColGroup$ git status
On branch main
Your branch is up to date with 'origin/main'.
``` |
janniklinde
left a comment
There was a problem hiding this comment.
Thanks for the updates. I left comments in the code which should still be fixed. Most of them are minor and easy to patch.
Please address those remaining issues to pass the project.
| public static AColGroup compressPiecewiseLinearFunctional(IColIndex colIndexes, MatrixBlock in, | ||
| CompressionSettings cs) { | ||
|
|
||
| final int numRows = in.getNumRows(); | ||
| final int numCols = colIndexes.size(); | ||
| int[][] breakpointsPerCol = new int[numCols][]; | ||
| double[][] slopesPerCol = new double[numCols][]; | ||
| double[][] interceptsPerCol = new double[numCols][]; | ||
|
|
||
| for(int col = 0; col < numCols; col++) { | ||
| final int colIdx = colIndexes.get(col); | ||
| double[] column = PiecewiseLinearUtils.getColumn(in, colIdx); | ||
| PiecewiseLinearUtils.SegmentedRegression fit = PiecewiseLinearUtils | ||
| .compressSuccessivePiecewiseLinear(column, cs); | ||
| breakpointsPerCol[col] = fit.getBreakpoints(); | ||
| interceptsPerCol[col] = fit.getIntercepts(); | ||
| slopesPerCol[col] = fit.getSlopes(); | ||
|
|
||
| } | ||
| return ColGroupPiecewiseLinearCompressed.create(colIndexes, breakpointsPerCol, slopesPerCol, interceptsPerCol, | ||
| numRows); | ||
|
|
||
| } |
There was a problem hiding this comment.
Incorrect if cs.transposed = true, ther e you need to iterate over rows
There was a problem hiding this comment.
A few recurring patterns I noticed here:
- Several tests only verify return types, non-null values, or that unsupported methods throw
- Some expected results derived from the implementation itself instead of being computed independently
- Error tolerances sometimes very loose relative to input range
- Missing edge cases (e.g., non-commutative ops, transposed input, zero target loss, serialization through the normal
ColGroupIO) - Leftover DP tests
…l statements turn to throwNotImplenmented functions
|
Let me know once all issues have been addressed for me to make a final pass over the code @Mancer1. |
|
@janniklinde, I'll tell you when we're fully done with the changes. I'm just replying "Done" to your comments for better team coordination and to know which changes have been made. |
|
@janniklinde, we have made the changes you have requested. You may rerun the workflows. |
|
@janniklinde, as mentioned before, the Java Code Style failure happens on files that are not part of our PR. We have done both dev/format-changed.sh and dev/format-changed.sh upstream/main before we pushed our code. |
janniklinde
left a comment
There was a problem hiding this comment.
I did another review pass and looks much better now. Most of the comments have been resolved. Have a look at the comments that are still open and the ones that I added now.
| /** | ||
| * This class represents a new ColGroup which is compresses column into segments (piecewise linear) to represent the | ||
| * original Data each column is approximate by a set of linear segments defined by breakpoints, slopes and intercepts | ||
| */ | ||
|
|
||
| public class ColGroupPiecewiseLinearCompressed extends AColGroupCompressed { | ||
| /** | ||
| * breakpoints indices per column to define the segment boundaries slopes of the regression line per segment per | ||
| * column intercepts of the regression line per segment per column | ||
| */ |
There was a problem hiding this comment.
Weird comment, maybe one above class
| int[][] breakpointsPerCol; | ||
| double[][] slopesPerCol; | ||
| double[][] interceptsPerCol; | ||
| int numRows; |
| /** | ||
| * Performance benchmark for piecewise linear compression. Successive is benchmarked across large matrices to show | ||
| * scalability. DP is only used as a quality reference on small matrices due to quadratic complexity | ||
| * | ||
| */ |
| return mb; | ||
| } | ||
|
|
||
| /// returns a average number of segments per column |
| /** | ||
| * Tests for ColGroupPiecewiseLinearCompressed operations. | ||
| */ |
| assertTrue("disk size should be positive", colGroupPLC.getExactSizeOnDisk() > 0); | ||
| assertTrue("num values should be positive", colGroupPLC.getNumValues() > 0); | ||
| } |
Group Project for the AMLS Module