TextClassification of PredictionIO WILL NOT get trained. NO MATTER WHAT

101 views Asked by At

Using Text Classification Engine of PredictionIO.

  1. Changed the "appName" in engine.json.
  2. Changed the code in DataSource.scala(for "Event" & "EntityType. Label & Text properties are of same form for each event in JSON file)
  3. Changed Evaluation.scala(for "appName")
  4. Using PostgreSQL. Had to keep Driver jar in Spark Lib folder. "pio import" worked only after that. Can see data in table pio_event_1. http://localhost:7070/events.json?accessKey= returns records.
  5. Engine got built.
  6. THEN IT FAILS for "pio train --verbose"

Keep observing the exception as below,

Exception in thread "main" java.lang.IllegalStateException: Haven't seen any document yet. at org.apache.spark.mllib.feature.IDF$DocumentFrequencyAggregator.idf(IDF.scala:136) at org.apache.spark.mllib.feature.IDF.fit(IDF.scala:59) at com.accenture.predictionio.Preparator.prepare(Preparator.scala:33) at com.accenture.predictionio.Preparator.prepare(Preparator.scala:24) at org.apache.predictionio.controller.PPreparator.prepareBase(PPreparator.scala:37) at org.apache.predictionio.controller.Engine$.train(Engine.scala:671) at org.apache.predictionio.controller.Engine.train(Engine.scala:177) at org.apache.predictionio.workflow.CoreWorkflow$.runTrain(CoreWorkflow.scala:67) at org.apache.predictionio.workflow.CreateWorkflow$.main(CreateWorkflow.scala:250) at org.apache.predictionio.workflow.CreateWorkflow.main(CreateWorkflow.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:672) at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

0

There are 0 answers