Github user sethah commented on a diff in the pull request:
https://github.com/apache/spark/pull/11939#discussion_r59825160
--- Diff: python/pyspark/ml/param/__init__.py ---
@@ -389,8 +391,8 @@ def copy(self, extra=None):
if extra is None:
extra = dict()
that = copy.copy(self)
- that._paramMap = self.extractParamMap(extra)
- return that
+ that._paramMap = {}
--- End diff --
The reason I changed this is because when you pass in "extra" params, they
will get set in the param map without ever calling `_set`. This is particularly
a problem when people use param maps for cross validator, which passes "extra"
params through the `fit` call. So, if someone specifies an int for a param that
takes float, they get the nasty py4j error.
---
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]