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

   ### What changes were proposed in this pull request?
   
   Add the existing `intermediateStorageLevel` shared parameter and its setter 
to `LogisticRegression`, `LinearSVC`, `FMClassifier`, and 
`MultilayerPerceptronClassifier` in Scala and PySpark. Apply the configured 
level when caching intermediate training data, including the perceptron's 
internal `FeedForwardTrainer`.
   
   ### Why are the changes needed?
   
   These classifiers create and cache intermediate training datasets 
internally, so caching the input DataFrame does not control their storage 
level. Exposing this parameter lets users choose a level such as `DISK_ONLY` to 
reduce memory pressure.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The four classifiers gain `intermediateStorageLevel` and 
`setIntermediateStorageLevel`. The default remains `MEMORY_AND_DISK`; the 
shared validator rejects `NONE` and invalid storage levels.
   
   ### How was this patch tested?
   
   - `ClassifierStorageLevelSuite`: 4 tests passed, covering defaults, invalid 
values, copying, estimator save/load, model parameter propagation, and actual 
`DISK_ONLY` training blocks.
   - Scala source/test style checks and MLlib MiMa passed.
   - Python lint and formatting checks passed.
   - PySpark `ClassificationTests.test_intermediate_storage_level` and 
`DefaultValuesTests.test_java_params` passed against a freshly built 
Hive-enabled assembly.
   
   ### 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