Skip to content

[SPARK-58396][ML][CONNECT] Include FPGrowth metadata in size estimates - #57590

Closed
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:fpgrowth-model-size-metadata-dev3
Closed

[SPARK-58396][ML][CONNECT] Include FPGrowth metadata in size estimates#57590
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:fpgrowth-model-size-metadata-dev3

Conversation

@zhengruifeng

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Adds parameter metadata to FPGrowthModel.estimatedSize while retaining its existing frequent-itemset and item-support estimates. Adds regression coverage using the suite's small FP-growth dataset.

Why are the changes needed?

The specialized estimate counted learned data but omitted the model's parameter metadata.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added FPGrowthModel estimated size coverage in FPGrowthSuite. The suite was not run locally.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Codex (GPT-5)

@zhengruifeng
zhengruifeng marked this pull request as ready for review July 28, 2026 08:18

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @zhengruifeng! Left just one comment, otherwise LGTM

ParamsSuite.checkParams(model)
}

test("FPGrowthModel estimated size") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The new test asserts only estimatedSize < 16 KiB (an upper bound). Because the training dataset is tiny (4 rows, 3 frequent items), this upper bound holds with or without the 6-line metadata addition; the test would pass if estimateMatadataSize were removed, so it does not guard the behavior it introduces. The same-day ALS sibling (SPARK-58367) used the stronger two-assertion pattern: first model.estimatedSize === estimatedDFSize + model.estimateMatadataSize to pin the metadata contribution, then the < 16 KiB bound. Recommend adding an equality assertion that binds estimateMatadataSize so the test is an actual regression guard. Note: the clustering siblings (SPARK-58361) used upper-bound-only and were merged without objection, so the author may consider this precedent sufficient, but the ALS test in the same series is the stronger template.

zhengruifeng added a commit that referenced this pull request Jul 29, 2026
### What changes were proposed in this pull request?

Adds parameter metadata to `FPGrowthModel.estimatedSize` while retaining its existing frequent-itemset and item-support estimates. Adds regression coverage using the suite's small FP-growth dataset.

### Why are the changes needed?

The specialized estimate counted learned data but omitted the model's parameter metadata.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Added `FPGrowthModel estimated size` coverage in `FPGrowthSuite`. The suite was not run locally.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Codex (GPT-5)

Closes #57590 from zhengruifeng/fpgrowth-model-size-metadata-dev3.

Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
(cherry picked from commit 233f1a4)
Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
@zhengruifeng

Copy link
Copy Markdown
Contributor Author

Merge Summary:

Posted by merge_spark_pr.py

@zhengruifeng
zhengruifeng deleted the fpgrowth-model-size-metadata-dev3 branch July 29, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants