Github user holdenk commented on a diff in the pull request:
https://github.com/apache/spark/pull/6139#discussion_r30362255
--- Diff: python/pyspark/ml/tests.py ---
@@ -112,14 +112,15 @@ def test_pipeline(self):
self.assertEqual(6, dataset.index)
-class TestParams(HasMaxIter, HasInputCol):
+class TestParams(HasMaxIter, HasInputCol, HasSeed):
"""
- A subclass of Params mixed with HasMaxIter and HasInputCol.
+ A subclass of Params mixed with HasMaxIter, HasInputCol and HasSeed.
"""
- def __init__(self):
+ def __init__(self, seed=None):
super(TestParams, self).__init__()
self._setDefault(maxIter=10)
+ self._set(seed=seed)
--- End diff --
Yes, that is the desired effect. If in the kwargs it is set to one then we
use the default. This also matches the behaviour taken in the classes that use
hasSeed (although they do wrap it through a few extra levels of function calls
I left off here for test simplicity).
---
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]