uros-b commented on code in PR #56522:
URL: https://github.com/apache/spark/pull/56522#discussion_r3430452712


##########
python/pyspark/ml/tuning.py:
##########
@@ -740,14 +740,12 @@ def __init__(
         parallelism: int = 1,
         collectSubModels: bool = False,
         foldCol: str = "",
-    ) -> None:
-        """
-        __init__(self, \\*, estimator=None, estimatorParamMaps=None, 
evaluator=None, numFolds=3,\
-                 seed=None, parallelism=1, collectSubModels=False, foldCol="")
-        """
-        super().__init__()
-        self._setDefault(parallelism=1)
+    ):

Review Comment:
   It doesn't seem that the root cause is actually fixed. The real source is 
the shared HasSeed mixin: shared.py:332 → 
`_setDefault(seed=hash(type(self).__name__))` , which is inherited by ~28 
estimators. The PR patches only CrossValidator, but for example 
TrainValidationSplit (the sibling tuning estimator in the very same file) has 
the identical pattern and is left unfixed. The holistic fix probably belongs in 
`HasSeed` / the code generator.



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