[SPARK-58215][ML][CONNECT] Include parameter metadata in tree regressor size estimates#57367
Closed
zhengruifeng wants to merge 1 commit into
Closed
Conversation
…or size estimates
zhengruifeng
marked this pull request as ready for review
July 20, 2026 10:45
HyukjinKwon
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This patch extends the parameter-metadata accounting from #57322 to
DecisionTreeRegressionModel,RandomForestRegressionModel, andGBTRegressionModel. Their customestimatedSizeimplementations 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 --checkpassed. The relevant test suite was not run.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-5)