Commit 678ee31
committed
[SPARK-58215][ML][CONNECT] Include parameter metadata in tree regressor size estimates
### 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)
Closes #57367 from zhengruifeng/SPARK-58182-tree-regressor-size-metadata-dev2.
Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>1 parent 78aa3e0 commit 678ee31
3 files changed
Lines changed: 3 additions & 3 deletions
File tree
- mllib/src/main/scala/org/apache/spark/ml/regression
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
0 commit comments