Closed jmcmt87 closed 2 years ago
Hi @jmcmt87
: java.util.NoSuchElementException: Param activation does not exist.
The activation
param was introduced in spark-nlp==3.4.3
Your Spark NLP Maven version is not matched with your spark-nlp
PyPI version. (one of them has this param, the other one doesn't) - you could be in a different Python/Conda envs which one might be 3.4.2 so you didn't get any error.
3.4.3
: pip install --upgrade spark-nlp==3.4.3
spark-nlp-spark32_2.12:3.4.3
A simple working example: https://colab.research.google.com/drive/1K01lkBEIE4dGTqIIj9CwG3Iu0wtgFWYz?usp=sharing
It works! Thanks!
Oh, no, it's not working, same issue, even tho upgrading to 3.4.3 and having the package spark-nlp-spark32_2.12:3.4.3
there must be a mismatch somewhere in your setup for sure, as you saw in the Colab there is no issue with the release or the model. (just having something doesn't mean you actually have it, something can be cached or pull something else from somewhere else. I would start looking closely there)
As for the working example in Colab, I can also get the classes, that doesn't seem to be the issue. I will check it further
It works, you were right
When I use the model 'bert_sequence_classifier_emotion' or DistilBERT Sequence Classification - Emotion it throws a Type Error, any other emotion classifier works fine.
Description
When I use the 'bert_sequence_classifier_emotion' I get the following error message:
TypeError("Params must be a param map but got %s." % type(params))
, this error seems to be an incompatibility of the output of the model and thepyspark.ml.pipeline
I consider it a bug because this model has worked in my app for days and all of a sudden it stopped working, I thought it could have something to do with my dataframe but I still have the same problem with other dataframes I tried.
Also, this only happens to me when I use a BERT model that was originally from Hugging Face, as I said, any other classificator works fine.
I use the pre-trained model as it's shown in the Spark NLP page:
Expected Behavior
To be able to process the dataframe with it, as I used to be able to before the error
Current Behavior
It throws the following error message:
Possible Solution
Steps to Reproduce
This is how I'm using it:
I decided to try another pre-trained model from Spark NLP instead of this one and it works, I also try with another dataframes and it doesn't work, so I'm sure is the model that is not working.
Context
I cannot continue unless I use other pre-trained model ('classifierdl_use_emotion'), but it's much worse.
Your Environment
spark.version
: 3.2.1java -version
: "1.8.0_311"And this is my PySpark configuration: