Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6139#discussion_r30625042
  
    --- 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 --
    
    It should probably do what other subclasses of Params do.  E.g., look at 
Word2Vec in features.py:
    ```
            kwargs = self.__init__._input_kwargs
            self.setParams(**kwargs)
    ```
    This way, Param "seed" will only be explicitly set in self._paramMap if it 
is specified by the user.  We want to be able to distinguish between users 
specifying a parameter vs. not.


---
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]

Reply via email to