Skip to content

[SPARK-58215][ML][CONNECT] Include parameter metadata in tree regressor size estimates#57367

Closed
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:SPARK-58182-tree-regressor-size-metadata-dev2
Closed

[SPARK-58215][ML][CONNECT] Include parameter metadata in tree regressor size estimates#57367
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:SPARK-58182-tree-regressor-size-metadata-dev2

Conversation

@zhengruifeng

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This patch extends the parameter-metadata accounting from #57322 to DecisionTreeRegressionModel, RandomForestRegressionModel, and GBTRegressionModel. Their custom estimatedSize implementations now include the existing parameter/default maps and UID in addition to learned tree state.

The existing Spark Connect early-stop test limits are raised to reflect the classifier metadata accounting introduced by #57322.

Why are the changes needed?

Spark Connect uses a model's estimated size for ML cache accounting and tree-training early stopping. The tree regression models override the general estimate but previously omitted their parameter metadata, undercounting the memory charged to cached models. This keeps the regression models consistent with the classifier counterparts.

Does this PR introduce any user-facing change?

Yes. Spark Connect reports a larger estimated size for tree regression models, so ML cache accounting and model-size-based early stopping include model parameter metadata.

How was this patch tested?

Updated the existing Connect tree-model early-stop limits to account for metadata. git diff --check passed. The relevant test suite was not run.

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

Generated-by: Codex (GPT-5)

@zhengruifeng zhengruifeng changed the title [WIP][SPARK-58182][ML][CONNECT] Include parameter metadata in tree regressor size estimates [SPARK-58215][ML][CONNECT] Include parameter metadata in tree regressor size estimates Jul 20, 2026
@zhengruifeng
zhengruifeng marked this pull request as ready for review July 20, 2026 10:45
@zhengruifeng
zhengruifeng requested a review from HyukjinKwon July 20, 2026 10:45
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