Provided Tutorial notebook doesn't run
bipinkc19 opened this issue · 2 comments
bipinkc19 commented
Provided Tutorial notebook doesn't run
Description
Here this errors occurs while running it in collab
Py4JJavaError: An error occurred while calling None.com.johnsnowlabs.nlp.DocumentAssembler.
: java.lang.NoSuchMethodError: org.apache.spark.ml.util.MLWritable.$init$(Lorg/apache/spark/ml/util/MLWritable;)V
at com.johnsnowlabs.nlp.DocumentAssembler.<init>(DocumentAssembler.scala:13)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:247)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:238)
at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80)
at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.lang.Thread.run(Thread.java:748)
```
## Steps to Reproduce
Running this collab
https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/streamlit_notebooks/NER_EN.ipynb
With the versions specified in the install
maziyarpanahi commented
Hi,
Sorry, the notebook hasn't been updated, this part is an issue that installs pyspark 2.4.x with default spark-nlp
which is on pyspark 3.x:
Please do a factory reset in your Colab and follow this instruction:
https://github.com/JohnSnowLabs/spark-nlp#google-colab-notebook
You can replace that block simple with the following script until all the notebooks are updated with this new script:
# This is only to setup PySpark and Spark NLP on Colab
!wget -q https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/scripts/colab/colab_setup.sh
!bash colab_setup.sh
HashamUlHaq commented
@bipinkc19 We have fixed the notebooks. Please check now.