Skip to content

Project: S3779 LZW ColGroup | ASML - #2560

Open
MasterBrain2000 wants to merge 39 commits into
apache:mainfrom
MasterBrain2000:main
Open

Project: S3779 LZW ColGroup | ASML#2560
MasterBrain2000 wants to merge 39 commits into
apache:mainfrom
MasterBrain2000:main

Conversation

@MasterBrain2000

Copy link
Copy Markdown

Group Project for the AMLS Module

@janniklinde

Copy link
Copy Markdown
Contributor

Your code does not build (see error logs). Could you please fix those issues to have a prototype that compiles?

@janniklinde

Copy link
Copy Markdown
Contributor

@MasterBrain2000 @m-ollka @Mancer1 could you please address the issues causing the tests to fail? Thanks

@Mancer1

Mancer1 commented Aug 3, 2026

Copy link
Copy Markdown

@janniklinde, all the build problems have been addressed.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.77118% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.52%. Comparing base (d5f6950) to head (3284f6f).
⚠️ Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
...ss/colgroup/ColGroupPiecewiseLinearCompressed.java 90.17% 31 Missing and 35 partials ⚠️
...ress/colgroup/functional/PiecewiseLinearUtils.java 92.85% 3 Missing and 3 partials ⚠️
...he/sysds/runtime/compress/colgroup/ColGroupIO.java 88.88% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Mancer1

Mancer1 commented Aug 3, 2026

Copy link
Copy Markdown

@janniklinde, How much code coverage is accepted? We have some null functions that are required to be implemented but never called.

@janniklinde

Copy link
Copy Markdown
Contributor

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 AColGroup implementations as a reference.

Also, please avoid reimplementing helper functionality that is already available in the test utilities, such as random matrix generation.

Mancer1 and others added 7 commits August 3, 2026 16:43
# Conflicts:
#	src/main/java/org/apache/sysds/runtime/compress/colgroup/ColGroupPiecewiseLinearCompressed.java
#	src/test/java/org/apache/sysds/test/component/compress/colgroup/ColGroupPiecewiseLinearCompressedOperationsTest.java
@Mancer1

Mancer1 commented Aug 7, 2026

Copy link
Copy Markdown

@janniklinde, we have improved the coverage to 95%. I hope that suffices

@Mancer1

Mancer1 commented Aug 8, 2026

Copy link
Copy Markdown

@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?

@janniklinde

Copy link
Copy Markdown
Contributor

You can simply run the following @Mancer1:

git fetch upstream
dev/format-changed.sh upstream/main

@Mancer1

Mancer1 commented Aug 10, 2026

Copy link
Copy Markdown

You can simply run the following @Mancer1:

git fetch upstream
dev/format-changed.sh upstream/main

@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
janniklinde self-requested a review August 10, 2026 11:10

@janniklinde janniklinde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/main/java/org/apache/sysds/runtime/compress/colgroup/ColGroupFactory.java Outdated
Comment on lines +1097 to +1119
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);

}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect if cs.transposed = true, ther e you need to iterate over rows

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Just need Tests for coverage

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-project-automation github-project-automation Bot moved this from In Progress to In Review in SystemDS PR Queue Aug 10, 2026
@janniklinde

Copy link
Copy Markdown
Contributor

Let me know once all issues have been addressed for me to make a final pass over the code @Mancer1.

@Mancer1

Mancer1 commented Aug 13, 2026

Copy link
Copy Markdown

@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.

@Mancer1

Mancer1 commented Aug 15, 2026

Copy link
Copy Markdown

@janniklinde, we have made the changes you have requested. You may rerun the workflows.

@Mancer1

Mancer1 commented Aug 16, 2026

Copy link
Copy Markdown

@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 janniklinde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +51 to +60
/**
* 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
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird comment, maybe one above class

Comment on lines +61 to +64
int[][] breakpointsPerCol;
double[][] slopesPerCol;
double[][] interceptsPerCol;
int numRows;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not private?

Comment on lines +36 to +40
/**
* 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
*
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outdated comment

return mb;
}

/// returns a average number of segments per column

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary comment

Comment on lines +82 to +84
/**
* Tests for ColGroupPiecewiseLinearCompressed operations.
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary

Comment on lines +353 to +355
assertTrue("disk size should be positive", colGroupPLC.getExactSizeOnDisk() > 0);
assertTrue("num values should be positive", colGroupPLC.getNumValues() > 0);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weak assert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

5 participants