Skip to content

Commit 56ad70e

Browse files
committed
add a note about SPARK-3990
1 parent cdcf546 commit 56ad70e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

python/pyspark/mllib/recommendation.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ def predictAll(self, usersProducts):
6060

6161
class ALS(object):
6262

63+
"""Alternatiing Least Squares matrix factorization.
64+
65+
SPARK-3990: In Spark 1.1.x, we use Kryo serialization by default in
66+
PySpark. ALS does not work under this default setting. You can switch
67+
back to the default Java serialization by setting:
68+
69+
spark.serializer=org.apache.spark.serializer.JavaSerializer
70+
71+
Please go to http://spark.apache.org/docs/latest/configuration.html
72+
for instructions on how to configure Spark.
73+
"""
74+
6375
@classmethod
6476
def train(cls, ratings, rank, iterations=5, lambda_=0.01, blocks=-1):
6577
sc = ratings.context

0 commit comments

Comments
 (0)