Github user BryanCutler commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17849#discussion_r132516813
  
    --- Diff: python/pyspark/ml/wrapper.py ---
    @@ -135,6 +135,20 @@ def _transfer_param_map_to_java(self, pyParamMap):
                     paramMap.put([pair])
             return paramMap
     
    +    def _create_params_from_java(self):
    +        """
    +        SPARK-10931: Temporary fix to create params that are defined in 
the Java obj but not here
    +        """
    +        java_params = list(self._java_obj.params())
    +        from pyspark.ml.param import Param
    +        for java_param in java_params:
    +            java_param_name = java_param.name()
    +            if not hasattr(self, java_param_name):
    +                param = Param(self, java_param_name, java_param.doc())
    +                setattr(param, "created_from_java_param", True)
    --- End diff --
    
    Since this is part of a temporary fix to add Params that are defined in 
Java but not in Python, then this just adds a tag to the Param in case 
something goes wrong we will know the param was created here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to