Github user BryanCutler commented on a diff in the pull request: https://github.com/apache/spark/pull/18982#discussion_r134380704 --- Diff: python/pyspark/ml/wrapper.py --- @@ -118,11 +118,13 @@ def _transfer_params_to_java(self): """ Transforms the embedded params to the companion Java object. """ - paramMap = self.extractParamMap() for param in self.params: - if param in paramMap: - pair = self._make_java_param_pair(param, paramMap[param]) + if param in self._paramMap: + pair = self._make_java_param_pair(param, self._paramMap[param]) self._java_obj.set(pair) + if param in self._defaultParamMap: --- End diff -- We usually make the assumption that Python defines the same default values as Java, in Spark ML at least, but given the circumstances of the JIRA - they defined their own Model - then it's still possible for `hasDefault` or the default value to return something different that Python would. So I'm just being overly cautious here, but it's pretty cheap to just transfer the default values anyway right?
--- 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