aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPatrick Wendell <pwendell@gmail.com>2014-01-18 16:21:43 -0800
committerPatrick Wendell <pwendell@gmail.com>2014-01-18 16:21:43 -0800
commit4c16f79ce45a68ee613a3d565b0e8676b724f867 (patch)
tree139300e7c438dffdf74eed2db5e55b3c2f74f8eb /python
parentbf5699543bf69fc850dbc2676caac97fa27818da (diff)
parent5b3a3e28d7666e5e93f3b4fc9c27714c751af9a8 (diff)
downloadspark-4c16f79ce45a68ee613a3d565b0e8676b724f867.tar.gz
spark-4c16f79ce45a68ee613a3d565b0e8676b724f867.tar.bz2
spark-4c16f79ce45a68ee613a3d565b0e8676b724f867.zip
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.
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/mllib/__init__.py10
-rwxr-xr-xpython/run-tests10
2 files changed, 15 insertions, 5 deletions
diff --git a/python/pyspark/mllib/__init__.py b/python/pyspark/mllib/__init__.py
index b1a5df109b..b420d7a7f2 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+")
diff --git a/python/run-tests b/python/run-tests
index 2005f610b4..a986ac9380 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