Could you guys take a look at the AssertionDLApproach class parameters labelCol and targetCol?
egenc opened this issue · 1 comments
egenc commented
This Java code:
AssertionDLApproach assertionDLApproach = new AssertionDLApproach();
assertionDLApproach.setLabelCol("my_labels");
generates this error (for setLabelCol and setTargetCol):
java.util.NoSuchElementException: Param my_labels does not exist.
at org.apache.spark.ml.param.Params$$anonfun$getParam$2.apply(params.scala:729)
at org.apache.spark.ml.param.Params$$anonfun$getParam$2.apply(params.scala:729)
at scala.Option.getOrElse(Option.scala:121)
at org.apache.spark.ml.param.Params$class.getParam(params.scala:728)
at org.apache.spark.ml.PipelineStage.getParam(Pipeline.scala:42)
at org.apache.spark.ml.param.Params$class.set(params.scala:744)
at org.apache.spark.ml.PipelineStage.set(Pipeline.scala:42)
at com.johnsnowlabs.nlp.annotators.assertion.dl.AssertionDLApproach.setLabelCol(AssertionDLApproach.scala:65)
at com.idexx.nlp.spark.jsl.ClinicalJslPipelineJobTests.testAssertionDLTraining(ClinicalJslPipelineJobTests.java:105)
egenc commented
make sure you have column my_labels in you dataframe. Solved the issue for me