0

Error in python:

 Py4JJavaError: An error occurred while calling o906.collectToPython.
: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 771.0 failed 1 times, most recent failure: Lost task 0.0 in stage 771.0 (TID 1350) (10.184.16.101 executor driver): org.apache.spark.SparkException: Python worker failed to connect back.

In the python code, I am using PySpark dataframe. I wrote the code as:

#3 random users
user_subset = [559369947, 514673131, 512411198]

#Recommend top 50 products for the users
recommendations = sc.createDataFrame([(user, 0) for user in user_subset], ['user_id', 'product_id'])
recommendations = als_model.recommendForUserSubset(recommendations, 50)
recommendations.show()
toyota Supra
  • 3,181
  • 4
  • 15
  • 19
Aditya
  • 1

0 Answers0