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

    https://github.com/apache/spark/pull/17849#discussion_r132518262
  
    --- 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):
    --- End diff --
    
    Good point, it's possible that there could be an attribute with that name 
that is not a param.  If that's the case, then it is probably best to just 
ignore silently since this is not critical to the model.


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