question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I got the following error when using lightGBM:

Exception in thread "Thread-376" java.lang.IllegalStateException:  failed to create LIGHTgbm subprocess with config name ~/models/fjufcncb20qtl7f7ehcpm5b6tn0.conf
        at ml.lightgbm.LightgbmRegressor.create_light_suprocess(LightgbmRegressor.java:426)
        at ml.lightgbm.LightgbmRegressor.fit(LightgbmRegressor.java:1566)
        at ml.lightgbm.LightgbmRegressor.run(LightgbmRegressor.java:514)
        at java.lang.Thread.run(Thread.java:745)
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.IllegalStateException:  Tree is not fitted
        at ml.Bagging.scoringhelperbagv2.<init>(scoringhelperbagv2.java:95)
        at ml.Bagging.BaggingRegressor.predict2d(BaggingRegressor.java:350)
        at ml.Bagging.BaggingRegressor.predict_proba(BaggingRegressor.java:1785)
        at ml.stacknet.StackNetRegressor.fit(StackNetRegressor.java:2632)
        at stacknetrun.runstacknet.main(runstacknet.java:525)
        ... 5 more

However, if I run lightgbm with the config file, it seems to be fine.

./lightgbm config=~/models/fjufcncb20qtl7f7ehcpm5b6tn0.conf task=train
[LightGBM] [Warning] Unknown parameter in config file: categorical_feature=
[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements.

And I can see some output in the model file after I run with lightgbm only:

tree
num_class=1
num_tree_per_iteration=1
label_index=0
max_feature_idx=18
objective=regression
boost_from_average
feature_names=Column_0 Column_1 Column_2 Column_3 Column_4 Column_5 Column_6 Column_7 Column_8 Column_9 Column_10 Column_11 Column_12 Column_13 Column_14 Column_15 Column_16 Column_17 Column_18
feature_infos=[16801:17165] [0:20] [0:16] [2:22741] [6037:6111] [33339295:34816009] none [1:240] [31:275] [1:5637] [60371011.101001002:61110091.001012005] [1286:3101] [95982:399675] [0:18] [1885:2015] [100:9948100] [1044:27750000] [278:24499999.999999996] [49.079999999999998:321936.09000000003]

Tree=0
num_leaves=2
split_feature=0
split_gain=-1
threshold=0
decision_type=0
default_value=0
left_child=-1
right_child=-2
leaf_parent=0 0
leaf_value=0.01149876969316053 0.01149876969316053
leaf_count=0 0
internal_value=0
internal_count=0
shrinkage=1
has_categorical=0

Here is my config file

boosting=gbdt
objective=regression
learning_rate=0.002
min_sum_hessian_in_leaf=0.001
min_data_in_leaf=20
feature_fraction=0.5
min_gain_to_split=1.0
bagging_fraction=0.9
poission_max_delta_step=0.0
lambda_l1=0.0
lambda_l2=0.0
scale_pos_weight=1.0
max_depth=4
num_threads=10
num_iterations=100
feature_fraction_seed=2
bagging_seed=2
drop_seed=2
data_random_seed=2
num_leaves=60
bagging_freq=1
xgboost_dart_mode=false
drop_rate=0.1
skip_drop=0.5
max_drop=50
top_rate=0.1
other_rate=0.1
huber_delta=0.1
fair_c=0.1
max_bin=255
min_data_in_bin=5
uniform_drop=false
two_round=false
is_unbalance=false
categorical_feature=
bin_construct_sample_cnt=1000000
is_sparse=true
verbosity=0
data=~/models/fjufcncb20qtl7f7ehcpm5b6tn0.train
output_model=~/model/models/fjufcncb20qtl7f7ehcpm5b6tn0.mod

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ajingcommented, Jul 14, 2017

You are right. I use relative path for StackNet.jar (e.g. java -Xmx4048m -jar ~/Libaries/StackNet/StackNet.jar). It works OK, if I run the program in the StackNet.jar folder.

Thanks!

1reaction
kaz-Anovacommented, Jul 14, 2017

It seems that for some reason StackNet is not able to find the executable. Is the lib/ folder in the same directory where the StackNet.jar file is?

Read more comments on GitHub >

github_iconTop Results From Across the Web

LightGBM FAQ — LightGBM 3.3.3.99 documentation
Possible Cause: This error means that you have multiple OpenMP libraries installed on your machine and they conflict with each other. (File extensions...
Read more >
Error when trying to use source-built python package for M1 mac
Description I'm trying to do some development on my M1 Mac, and while I'm able to generate the libraries and executables as expected, ......
Read more >
gcc - How can i install LightGBM? Error about Could not find ...
I can't install gcc@8 , gcc@7 and so on, so I tried brew install gcc and it worked. But cmake .. is failed....
Read more >
LightGBM Error | Data Science and Machine Learning - Kaggle
Hello! I'm new to using Kaggle Kernel for writing code. I'm trying to import lightgbm on kernel, but it gives "ModuleNotFoundError".
Read more >
Error while training LightGBM Model despite codenv set up as ...
Solved: Hello, I keep having the same error while trying to train an LightGBM model " Failed to train : : No module...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found