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$