0

I am getting this error whenever I try to fit my model using als in pyspark. Can anybody help with this?

Exception happened during processing of request from ('127.0.0.1', 55552)
    Traceback (most recent call last):
      File "C:\Users\wtibr\anaconda3\lib\socketserver.py", line 316, in _handle_request_noblock
        self.process_request(request, client_address)
      File "C:\Users\wtibr\anaconda3\lib\socketserver.py", line 347, in process_request
        self.finish_request(request, client_address)`enter code here`
      File "C:\Users\wtibr\anaconda3\lib\socketserver.py", line 360, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Users\wtibr\anaconda3\lib\socketserver.py", line 720, in __init__
        self.handle()
      File "C:\spark\spark\python\pyspark\accumulators.py", line 269, in handle
        poll(accum_updates)
      File "C:\spark\spark\python\pyspark\accumulators.py", line 241, in poll
        if func():
      File "C:\spark\spark\python\pyspark\accumulators.py", line 245, in accum_updates
        num_updates = read_int(self.rfile)
      File "C:\spark\spark\python\pyspark\serializers.py", line 722, in read_int
        length = stream.read(4)
      File "C:\Users\wtibr\anaconda3\lib\socket.py", line 589, in readinto
        return self._sock.recv_into(b)
    ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
    ----------------------------------------

Here is the code:

Mihail Duchev
  • 4,691
  • 10
  • 25
  • 32
  • The code needs to be posted as text, not an image – pppery Jun 16 '20 at 16:34
  • Here is the code `import findspark findspark.init() import pyspark as sp sc = SparkSession.builder.master("local[*]").getOrCreate() sqlContext = SQLContext(sc) als = ALS(rank = 12,maxIter=20,regParam = .18,coldStartStrategy = 'drop',nonnegative = True) (training,test) = review_DF.randomSplit([0.7,0.3]) model = als.fit(training)` – wandan23 Jun 17 '20 at 04:34

0 Answers0