zhengruifeng opened a new pull request, #60338: URL: https://github.com/apache/spark/pull/60338
### What changes were proposed in this pull request? Add the existing `intermediateStorageLevel` parameter to `LinearRegression`, `AFTSurvivalRegression`, `FMRegressor`, and `IsotonicRegression` in Scala and PySpark. Use the configured level for their internally cached training data. PySpark accepts the parameter through constructors, `setParams`, and setters. ### Why are the changes needed? These regressors hard-code the storage level of intermediate RDDs, which users cannot configure by caching their input DataFrame. The parameter allows choices such as `DISK_ONLY` to reduce memory pressure. ### Does this PR introduce _any_ user-facing change? Yes. The four regressors expose `intermediateStorageLevel`, defaulting to `MEMORY_AND_DISK`. For `LinearRegression`, it applies to training blocks used by the iterative solver. The existing shared validator rejects `NONE` and invalid storage levels. ### How was this patch tested? - Extended the existing Scala suites with simple default-value and setter/getter checks. All 75 executed Scala tests passed; two existing tests were ignored. - Extended existing PySpark tests to cover constructor keywords, `setParams`, setters, and model parameter propagation. - All nine focused classic PySpark, Spark Connect, and Java/Python parameter-parity checks passed. - A Scala smoke check confirmed `DISK_ONLY` cached RDDs for all four regressors, including `LinearRegression` with its iterative solver. - Scala source/test style checks, MLlib MiMa, and Python lint and formatting passed. ### 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]
