dchvn commented on a change in pull request #35530:
URL: https://github.com/apache/spark/pull/35530#discussion_r825774749



##########
File path: python/pyspark/ml/feature.py
##########
@@ -392,24 +465,29 @@ class _BucketedRandomProjectionLSHParams:
     .. versionadded:: 3.0.0
     """
 
-    bucketLength = Param(
+    bucketLength: Param[float] = Param(
         Params._dummy(),
         "bucketLength",
         "the length of each hash bucket, " + "a larger bucket lowers the false 
negative rate.",
         typeConverter=TypeConverters.toFloat,
     )
 
     @since("2.2.0")
-    def getBucketLength(self):
+    def getBucketLength(self) -> float:
         """
         Gets the value of bucketLength or its default value.
         """
-        return self.getOrDefault(self.bucketLength)
+        return self.getOrDefault(self.bucketLength)  # type: 
ignore[attr-defined]

Review comment:
       After checking with mypy: `python/pyspark/ml/feature.py:480: error: 
"_BucketedRandomProjectionLSHParams" has no attribute "getOrDefault"  
[attr-defined]`




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