You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/11/22 11:35:17 UTC
[GitHub] [spark] zero323 commented on a change in pull request #34674: [SPARK-37419][PYTHON][ML] Rewrite _shared_params_code_gen.py to inline type hints for ml/param/shared.py
zero323 commented on a change in pull request #34674:
URL: https://github.com/apache/spark/pull/34674#discussion_r754186121
##########
File path: python/pyspark/ml/param/__init__.pyi
##########
@@ -94,3 +94,6 @@ class Params(pyspark.ml.util.Identifiable, metaclass=abc.ABCMeta):
def copy(self, extra: Optional[pyspark.ml._typing.ParamMap] = ...) -> Params: ...
def set(self, param: Param, value: Any) -> None: ...
def clear(self, param: Param) -> None: ...
+ def _setDefault(self: P, **kwargs: Any) -> P: ...
+ @staticmethod
+ def _dummy() -> Params: ...
Review comment:
That's correct. We use `Params._dummy` as a `parent` for newly initialized `Param`. It makes more sense to fix it here (it will be visible once we inline `__init__.py`, than adding more cleanup work later.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org