1

I have been trying to run the John Snow Spark-NLP example from this repository:

https://github.com/JohnSnowLabs/spark-nlp/blob/master/example/src/TrainViveknSentiment.scala

on my local machine. But it throws the org.apache.spark.SparkException: Task not serializable error when it arrives on val sparkPipeline = pipeline.fit(training) in the stack it also says Caused by: java.io.NotSerializableException: com.johnsnowlabs.nlp.annotators.param.AnnotatorParam$SerializableFormat$

jave
  • 11
  • 3

1 Answers1

0

I might be wrong, but as far as I could research, Seq is probably a non-serializable trait. So using an Array or List instead to build the immutable variable training should solve the issue.

Dave Canton
  • 178
  • 4
  • Hi, thanks so much for the answer. I have already tried to convert to List and even to import from a csv, but I still have the same issue – jave Jan 24 '19 at 20:03