You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/01/19 01:23:01 UTC

git commit: Merge pull request #426 from mateiz/py-ml-tests

Updated Branches:
  refs/heads/branch-0.9 34e911ce9 -> 4ac8cab08


Merge pull request #426 from mateiz/py-ml-tests

Re-enable Python MLlib tests (require Python 2.7 and NumPy 1.7+)

We disabled these earlier because Jenkins didn't have these versions.
(cherry picked from commit 4c16f79ce45a68ee613a3d565b0e8676b724f867)

Signed-off-by: Patrick Wendell <pw...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/4ac8cab0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/4ac8cab0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/4ac8cab0

Branch: refs/heads/branch-0.9
Commit: 4ac8cab08141302c82c0388ccb98d627a144445d
Parents: 34e911c
Author: Patrick Wendell <pw...@gmail.com>
Authored: Sat Jan 18 16:21:43 2014 -0800
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Sat Jan 18 16:22:46 2014 -0800

----------------------------------------------------------------------
 python/pyspark/mllib/__init__.py | 10 ++++++++++
 python/run-tests                 | 10 +++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/4ac8cab0/python/pyspark/mllib/__init__.py
----------------------------------------------------------------------
diff --git a/python/pyspark/mllib/__init__.py b/python/pyspark/mllib/__init__.py
index b1a5df1..b420d7a 100644
--- a/python/pyspark/mllib/__init__.py
+++ b/python/pyspark/mllib/__init__.py
@@ -18,3 +18,13 @@
 """
 Python bindings for MLlib.
 """
+
+# MLlib currently needs Python 2.7+ and NumPy 1.7+, so complain if lower
+
+import sys
+if sys.version_info[0:2] < (2, 7):
+    raise Exception("MLlib requires Python 2.7+")
+
+import numpy
+if numpy.version.version < '1.7':
+    raise Exception("MLlib requires NumPy 1.7+")

http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/4ac8cab0/python/run-tests
----------------------------------------------------------------------
diff --git a/python/run-tests b/python/run-tests
index 2005f61..a986ac9 100755
--- a/python/run-tests
+++ b/python/run-tests
@@ -40,11 +40,11 @@ run_test "-m doctest pyspark/broadcast.py"
 run_test "-m doctest pyspark/accumulators.py"
 run_test "-m doctest pyspark/serializers.py"
 run_test "pyspark/tests.py"
-#run_test "pyspark/mllib/_common.py"
-#run_test "pyspark/mllib/classification.py"
-#run_test "pyspark/mllib/clustering.py"
-#run_test "pyspark/mllib/recommendation.py"
-#run_test "pyspark/mllib/regression.py"
+run_test "pyspark/mllib/_common.py"
+run_test "pyspark/mllib/classification.py"
+run_test "pyspark/mllib/clustering.py"
+run_test "pyspark/mllib/recommendation.py"
+run_test "pyspark/mllib/regression.py"
 
 if [[ $FAILED != 0 ]]; then
     echo -en "\033[31m"  # Red