Github user holdenk commented on a diff in the pull request: https://github.com/apache/spark/pull/9581#discussion_r48817341 --- Diff: python/pyspark/ml/param/__init__.py --- @@ -247,7 +248,27 @@ def _set(self, **kwargs): Sets user-supplied params. """ for param, value in kwargs.items(): - self._paramMap[getattr(self, param)] = value + p = getattr(self, param) + if (p.expectedType is not None): + if p.expectedType is None or type(value) == p.expectedType or value is None: --- End diff -- Thats a good point, I'll simplify the branching.
--- 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