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

   ### What changes were proposed in this pull request?
   
   Add the shared `intermediateStorageLevel` parameter to `GaussianMixture` in 
Scala and PySpark, including the Python constructor, `setParams`, and setter. 
Use it when persisting training instances and include it in instrumentation.
   
   ### Why are the changes needed?
   
   GaussianMixture currently hard-codes `MEMORY_AND_DISK` for its intermediate 
training instances. Exposing the storage level lets users choose options such 
as `DISK_ONLY` when training data competes for executor memory.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Users can configure the intermediate storage level through the Scala 
setter or PySpark constructor, `setParams`, and setter. The default remains 
`MEMORY_AND_DISK`, and the existing behavior for cached input datasets is 
preserved. The fitted model exposes the parameter through its getter.
   
   This change targets master and branch-4.x, with new API annotations for 
4.4.0.
   
   ### How was this patch tested?
   
   Extended the existing Scala default/setter checks and read/write parameter 
settings. Extended the existing PySpark GaussianMixture test to cover the 
default, constructor, `setParams`, setter, fitted model, and estimator/model 
save/load.
   
   All local checks passed:
   
   - `mllib/testOnly org.apache.spark.ml.clustering.GaussianMixtureSuite` (14 
tests).
   - `mllib/scalastyle`, `mllib/Test/scalastyle`, and 
`mllib/mimaReportBinaryIssues`.
   - Classic and Connect `test_gaussian_mixture`, plus 
`DefaultValuesTests.test_java_params`.
   - Ruff lint/format checks and `git diff --check`.
   
   An additional local Spark listener check observed `DISK_ONLY` on the 
training-instances RDD when fitting uncached input. Fitting the same data after 
caching the input left that intermediate RDD at `NONE`, confirming the existing 
persistence guard is preserved.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Codex (GPT-6)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to