Github user sethah commented on a diff in the pull request:
https://github.com/apache/spark/pull/11939#discussion_r59885374
--- Diff: python/pyspark/ml/param/__init__.py ---
@@ -439,12 +441,26 @@ def _set(self, **kwargs):
self._paramMap[p] = value
return self
+ def _clearParam(self, param):
+ """
+ Clears a param from the param map if it has been explicitly set.
+ """
+ if self.isSet(param):
+ del self._paramMap[param]
+
def _setDefault(self, **kwargs):
"""
Sets default params.
"""
for param, value in kwargs.items():
- self._defaultParamMap[getattr(self, param)] = value
+ p = getattr(self, param)
+ if value is not None and not isinstance(value, JavaObject):
--- End diff --
The type converter for `stopWordsRemover` is defined as
`TypeConverters.toListString` so this will fail without the check.
---
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]