Repository: spark Updated Branches: refs/heads/branch-1.3 5d9278a22 -> 84c627336
[SPARK-5585] Flaky test in MLlib python Add a seed for tests. Author: Davies Liu <[email protected]> Closes #4358 from davies/flaky_test and squashes the following commits: 02371c3 [Davies Liu] Merge branch 'master' of github.com:apache/spark into flaky_test ced499b [Davies Liu] add seed for test (cherry picked from commit 38a416f0360fa68fc445af14910fb253ff9ad493) Signed-off-by: Xiangrui Meng <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/84c62733 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/84c62733 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/84c62733 Branch: refs/heads/branch-1.3 Commit: 84c627336f0ba96f2d3279b2b82af7a48d824c13 Parents: 5d9278a Author: Davies Liu <[email protected]> Authored: Wed Feb 4 08:54:20 2015 -0800 Committer: Xiangrui Meng <[email protected]> Committed: Wed Feb 4 08:54:27 2015 -0800 ---------------------------------------------------------------------- python/pyspark/mllib/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/84c62733/python/pyspark/mllib/tests.py ---------------------------------------------------------------------- diff --git a/python/pyspark/mllib/tests.py b/python/pyspark/mllib/tests.py index 42aa228..49e5c9d 100644 --- a/python/pyspark/mllib/tests.py +++ b/python/pyspark/mllib/tests.py @@ -285,7 +285,7 @@ class ListTests(PySparkTestCase): self.assertTrue(dt_model.predict(features[3]) > 0) rf_model = RandomForest.trainRegressor( - rdd, categoricalFeaturesInfo=categoricalFeaturesInfo, numTrees=100) + rdd, categoricalFeaturesInfo=categoricalFeaturesInfo, numTrees=100, seed=1) self.assertTrue(rf_model.predict(features[0]) <= 0) self.assertTrue(rf_model.predict(features[1]) > 0) self.assertTrue(rf_model.predict(features[2]) <= 0) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
