Skip to content

Cannot load PipelineModel trained on PySpark in Scala #14075

Answered by maziyarpanahi
SidWeng asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @SidWeng
A few questions:

  • does it work without ICDOEntityResolver? Just to pin point the issue
  • does it work locally? (saving in PySpark and loading in Spark/Scala)
  • last not list, this import is strange to me:
from sparknlp.base import Pipeline

I think you should import the Pipeline from actual spark.ml rather than our Pipeline, because they are different. All of our examples use from pyspark.ml import Pipeline: https://github.com/search?q=repo%3AJohnSnowLabs%2Fspark-nlp+pipeline&type=code

In fact all you need is:

from sparknlp.base import *
from sparknlp.annotator import *
from pyspark.ml import Pipeline

I would start with this last point first and try to use these 3 imports. If it …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@SidWeng
Comment options

Comment options

You must be logged in to vote
3 replies
@maziyarpanahi
Comment options

Answer selected by SidWeng
@SidWeng
Comment options

@maziyarpanahi
Comment options

# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants