Zied Sellami created SPARK-21341:
------------------------------------

             Summary: Spark 2.1.1: I want to be able to serialize wordVectors 
on Word2VecModel 
                 Key: SPARK-21341
                 URL: https://issues.apache.org/jira/browse/SPARK-21341
             Project: Spark
          Issue Type: Bug
          Components: ML
    Affects Versions: 2.1.1
            Reporter: Zied Sellami


I am using sparContext.saveAsObjectFile to save a complex object containing a 
pipelineModel with a Word2Vec ML Transformer. When I load the object and call 
myPipelineModel.transform, Word2VecModel raise a null pointer error on line 292 
Word2Vec.scala "wordVectors.getVectors" . I resolve the problem by 
removing@transient annotation on val wordVectors and @transient lazy val on 
getVectors function.
-Why this 2 val are transient ?
-Any solution to add a boolean function on the Word2Vec Transformer to force 
the serialization of wordVectors.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to