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

    https://github.com/apache/spark/pull/6139#discussion_r30362380
  
    --- Diff: python/pyspark/ml/tests.py ---
    @@ -153,10 +155,26 @@ def test_params(self):
             with self.assertRaises(KeyError):
                 testParams.getInputCol()
     
    +        # Since the default is normally random, set it to a known number 
for debug str
    +        testParams._setDefault(seed=41)
    +        testParams.setSeed(43)
    +
             self.assertEquals(
                 testParams.explainParams(),
                 "\n".join(["inputCol: input column name (undefined)",
    -                       "maxIter: max number of iterations (>= 0) (default: 
10, current: 100)"]))
    +                       "maxIter: max number of iterations (>= 0) (default: 
10, current: 100)",
    +                       "seed: random seed (default: 41, current: 43)"]))
    +
    +    def test_hasseed(self):
    +        noSeedSpecd = TestParams()
    +        withSeedSpecd = TestParams(seed=42)
    +        # Check that we no longer use 42 as the magic number
    +        self.assertNotEqual(noSeedSpecd.getSeed(), 42)
    --- End diff --
    
    It is. I can make sure that 42 is never accepted as a random number or try 
this test k times, but I think 1/2^32 flakiness is maybe ok?


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