NerDLAproach bestModelMetric "Param bestModelMetric does not exist" Error #7469
-
I encountered an error which says "java.util.NoSuchElementException: Param bestModelMetric does not exist." when I try to execute https://nlp.johnsnowlabs.com/docs/en/serving_spark_nlp_via_api_databricks_mlflow example on Databricks. Then I saw that this metric is newly committed and saying "Make sure bestModelMetric is being used". But at first I couldn't find what the value should be. Then found some explanations (#6749 ) about this and inside them there are values such as "F1 Micro-average, F1 Macro-average, f1_micro, f1_macro, microF1, macrof1". But whatever I tried all of them one by one inside setBestModelMetric, and setUseBestModel(True) still getting same error. Here is the code: MAX_EPOCHS = 2 document = DocumentAssembler() sentence = SentenceDetector() token = Tokenizer() embeddings = BertEmbeddings.pretrained("bert_base_cased", "en") ner_approach = NerDLApproach() ner_preprocessing_pipeline = Pipeline(stages=[ ner_training_pipeline = Pipeline(stages = ner_preprocessing_pipeline.getStages() + [ner_approach]) ner_model = ner_training_pipeline.fit(training_data) Still receiving the same error "java.util.NoSuchElementException: Param bestModelMetric does not exist." Could you clarify me please? Is there anything wrong in the example? @maziyarpanahi |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Answered here #7470 |
Beta Was this translation helpful? Give feedback.
Answered here #7470