You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/07/31 03:17:39 UTC

[PR] [WIP][ML][CONNECT] Exclude tuning params from CrossValidatorModel size [spark]

zhengruifeng opened a new pull request, #57665:
URL: https://github.com/apache/spark/pull/57665

   ### What changes were proposed in this pull request?
   
   This patch adds an exclusion list to `Params.estimateMatadataSize` and uses it from `CrossValidatorModel.estimatedSize` to omit the estimator, evaluator, and estimator parameter maps. The model estimate instead includes the learned best model, collected submodels, metrics, and remaining metadata.
   
   ### Why are the changes needed?
   
   CrossValidatorModel retains tuning configuration in its parameter maps. Estimators and their parameter validators can retain logger or runtime state that reaches SparkSession and SparkContext. That shared state is not learned model data and can inflate ML Connect cache accounting.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. CrossValidatorModel size estimates no longer include shared runtime state retained by tuning configuration. Model behavior is unchanged.
   
   ### How was this patch tested?
   
   Added a CrossValidatorModel estimated-size regression test with a logger-initialized estimator.
   
   `JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 build/sbt 'mllib/testOnly org.apache.spark.ml.tuning.CrossValidatorSuite'`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Codex (GPT-5)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58462][ML][CONNECT] Exclude tuning params from CrossValidatorModel size [spark]

Posted by "uros-b (via GitHub)" <gi...@apache.org>.
uros-b commented on PR #57665:
URL: https://github.com/apache/spark/pull/57665#issuecomment-5142758954

   Thank you @zhengruifeng!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58462][ML][CONNECT] Exclude tuning params from CrossValidatorModel size [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #57665:
URL: https://github.com/apache/spark/pull/57665#issuecomment-5142912980

   **Merge Summary:**
   - merged into master https://github.com/apache/spark/commit/8f5277839e3c0506e26aafbba6c9b9a26dc29c45
   - merged into branch-4.x https://github.com/apache/spark/commit/b2142d23870395ad9a15b80d5ea1228fd9e68ab6
   
   *Posted by `merge_spark_pr.py`*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58462][ML][CONNECT] Exclude tuning params from CrossValidatorModel size [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #57665: [SPARK-58462][ML][CONNECT] Exclude tuning params from CrossValidatorModel size
URL: https://github.com/apache/spark/pull/57665


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org