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

    https://github.com/apache/spark/pull/10469#discussion_r50848128
  
    --- Diff: python/pyspark/ml/wrapper.py ---
    @@ -82,13 +71,16 @@ def _transfer_params_to_java(self):
                     pair = self._make_java_param_pair(param, paramMap[param])
                     self._java_obj.set(pair)
     
    -    def _transfer_params_from_java(self):
    +    def _transfer_params_from_java(self, withParent=False):
             """
             Transforms the embedded params from the companion Java object.
             """
             sc = SparkContext._active_spark_context
    +        parent = self._java_obj.uid()
             for param in self.params:
                 if self._java_obj.hasParam(param.name):
    +                if withParent:
    +                    param.parent = parent
    --- End diff --
    
    We should also copy ```parent``` from peer java object if the python object 
is instantiated by ```load```.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to