kaz-Anova / StackNet

StackNet is a computational, scalable and analytical Meta modelling framework
MIT License
1.32k stars 343 forks source link

Error Caused by java.lang.OutOfMemoryError: Java heap space #49

Closed snowneji closed 7 years ago

snowneji commented 7 years ago

After building 2 layers of stacking by: java -Xmx12048m -jar StackNet.jar train task=regression sparse=true has_head=false output_name=datasettwo model=model2 pred_file=pred2.csv train_file=dataset2_train.txt test_file=dataset2_test.txt test_target=false params=dataset2_params.txt verbose=true threads=1 metric=mae stackdata=false seed=1 folds=4 bins=3

The following error was raised:

Loaded File: dataset2_test.txt Total rows in the file: 2985217 Total columns in the file: undetrmined-Sparse Number of elements : 386731415 Loaded sparse test data with 2985217 and columns 170 loading test data lasted : 613.503000 Exception in thread "main" java.lang.reflect.InvocationTargetException 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.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: java.lang.OutOfMemoryError: Java heap space at utilis.map.intint.IntIntMapminus4a.<init>(IntIntMapminus4a.java:47) at matrix.smatrix.buildmap(smatrix.java:76) at ml.stacknet.StackNetRegressor.predict2d(StackNetRegressor.java:1496) at ml.stacknet.StackNetRegressor.predict_proba(StackNetRegressor.java:3942) at stacknetrun.runstacknet.main(runstacknet.java:691) ... 5 more

Any advice ? Thanks!

snowneji commented 7 years ago

Will that help if I increase the memory like it pointed out here:

https://stackoverflow.com/questions/11824134/caused-by-java-lang-outofmemoryerror-java-heap-space

kaz-Anova commented 7 years ago

Hi @snowneji . Yes try increasing java -Xmx12048m to more than that. For example put java -Xmx16048m if you have 16GB available .

snowneji commented 7 years ago

Thank you!