dongjoon-hyun commented on code in PR #60338:
URL: https://github.com/apache/spark/pull/60338#discussion_r4546431560


##########
mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala:
##########
@@ -326,13 +327,17 @@ class LinearRegression @Since("1.3.0") (@Since("1.3.0") 
override val uid: String
   @Since("3.1.0")
   def setMaxBlockSizeInMB(value: Double): this.type = set(maxBlockSizeInMB, 
value)
 
+  /** @group expertSetParam */

Review Comment:
   Could we document here (and in the PySpark docstring) that this param only 
takes effect on the iterative path? The only `persist` in `LinearRegression` is 
in `trainImpl` (line 557). With the default `solver=auto`, `loss=squaredError`, 
and `numFeatures <= 4096`, `train` returns via `trainWithNormal` (line 360) 
before anything is cached, and also via `trainWithConstantLabel` (line 383) for 
a constant label. So, `setIntermediateStorageLevel("DISK_ONLY")` is silently a 
no-op in the most common configuration.



##########
python/pyspark/ml/regression.py:
##########
@@ -3103,6 +3146,7 @@ class FMRegressor(
     _FactorizationMachinesParams,
     JavaMLWritable,
     JavaMLReadable["FMRegressor"],
+    HasIntermediateStorageLevel,

Review Comment:
   nit. For consistency with `FMClassifier` and `FMClassificationModel` in 
`classification.py`, shall we put `HasIntermediateStorageLevel` right after 
`_FactorizationMachinesParams`? The same for `FMRegressionModel` below.



-- 
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