Damiano Caprari
Damiano Caprari

Reputation: 73

StackOverflowError when Training an Engine with PredictionIO

I have followed the QuickStart Guide at http://predictionio.incubator.apache.org/templates/recommendation/quickstart/

Installed PredictionIO. EventServer works fine. New App created successfully. GET and POST requests work fine. Import the sample-data worked fine.

pio build

worked fine. but when i try to run

pio train

i get this error

[INFO] [Engine] Extracting datasource params...
[INFO] [WorkflowUtils$] No 'name' is found. Default empty String will be used.
[INFO] [Engine] Datasource params: (,DataSourceParams(MyApp1,None))
[INFO] [Engine] Extracting preparator params...
[INFO] [Engine] Preparator params: (,Empty)
[INFO] [Engine] Extracting serving params...
[INFO] [Engine] Serving params: (,Empty)
[WARN] [Utils] Your hostname, damiano-asus resolves to a loopback address: 127.0.0.1; using 10.0.10.150 instead (on interface wlp3s0)
[WARN] [Utils] Set SPARK_LOCAL_IP if you need to bind to another address
[INFO] [Remoting] Starting remoting
[INFO] [Remoting] Remoting started; listening on addresses :[akka.tcp://[email protected]:33231]
[WARN] [MetricsSystem] Using default name DAGScheduler for source because spark.app.id is not set.
[INFO] [Engine$] EngineWorkflow.train
[INFO] [Engine$] DataSource: damiano.company.DataSource@483b0690
[INFO] [Engine$] Preparator: damiano.company.Preparator@fb0a08c
[INFO] [Engine$] AlgorithmList: List(damiano.company.ALSAlgorithm@6a5e167a)
[INFO] [Engine$] Data sanity check is on.
[INFO] [Engine$] damiano.company.TrainingData does not support data sanity check. Skipping check.
[INFO] [Engine$] damiano.company.PreparedData does not support data sanity check. Skipping check.
[WARN] [BLAS] Failed to load implementation from: com.github.fommil.netlib.NativeSystemBLAS
[WARN] [BLAS] Failed to load implementation from: com.github.fommil.netlib.NativeRefBLAS
[WARN] [LAPACK] Failed to load implementation from: com.github.fommil.netlib.NativeSystemLAPACK
[WARN] [LAPACK] Failed to load implementation from: com.github.fommil.netlib.NativeRefLAPACK
[Stage 29:>                                                         (0 + 0) / 4][ERROR] [Executor] Exception in task 1.0 in stage 40.0 (TID 137)
[ERROR] [Executor] Exception in task 0.0 in stage 40.0 (TID 136)
[ERROR] [Executor] Exception in task 3.0 in stage 40.0 (TID 139)
[ERROR] [Executor] Exception in task 2.0 in stage 40.0 (TID 138)
[WARN] [TaskSetManager] Lost task 1.0 in stage 40.0 (TID 137, localhost):     java.lang.StackOverflowError
at     java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2901)
at     java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1700)

i guess it is due to the jvm heap/stack dimension? anyone know how ti fix this? thank you

Upvotes: 1

Views: 646

Answers (2)

Nishikant Nipane
Nishikant Nipane

Reputation: 58

Upgrade your spark version to spark-1.6.3-bin-hadoop2.6. I had similar issue what you are facing, upgrading to mentioned version resolved my issue.

Upvotes: 0

Damiano Caprari
Damiano Caprari

Reputation: 73

there is a quick work-around for the problem you can edit the engine.json file to lower the number of iterations
eg: "numIterations": 10, instead of 20

but if you need to increase the memory you can follow the FAQs at the bottom of the quickstart-guide page

http://predictionio.incubator.apache.org/resources/faq/#engine-training

start a spark master with ./sbin/start-master.sh
(if you followed the guide spark is in the .../vendors/spark-1.5.1-bin-hadoop2.6/ folder)
start a spark slave with ./sbin/start-slave.sh spark://<yourlocalhost>:7077
you should be able to see all running at http://localhost:8080

then you can run
pio train -- --master spark://localhost:7077 --driver-memory 16G --executor-memory 24G
i'm able to do 20 iterations with --driver-memory 3G --executor-memory 4G on a laptop

if you still have problems, try to configure the spark-default.conf file to suit your needs
i also had to add a line at the start of the .conf file
spark.mesos.coarse true

Upvotes: 1

Related Questions