ArdalanM/pyLightGBM

GBM predict with returned non-zero exit status 1 error

finlay-liu opened this issue · 3 comments

Hello ArdalanM, it's great and simple to use GBM in this py wrapper code.

Now i am run your notebook regression_example_kaggle_allstate.ipynb , get one error in gbmr.predict line, the output message is

<ipython-input-10-0c40d9335a9b> in <module>()
     22 
     23 gbmr.fit(X_train, y_train, test_data=[(X_valid, y_valid)])
---> 24 print("Mean Square Error: ", metrics.mean_absolute_error(y_true=(np.exp(y_valid)-1), y_pred=(np.exp(gbmr.predict(X_valid))-1)))

/usr/local/lib/python2.7/dist-packages/pylightgbm/models.pyc in predict(self, X)
    122 
    123         process = subprocess.check_output([self.exec_path, "config={}".format(conf_filepath)],
--> 124                                           universal_newlines=True)
    125 
    126         if self.verbose:

/usr/lib/python2.7/subprocess.pyc in check_output(*popenargs, **kwargs)
    572         if cmd is None:
    573             cmd = popenargs[0]
--> 574         raise CalledProcessError(retcode, cmd, output=output)
    575     return output
    576 

CalledProcessError: Command '['/home/lyz/Workspace/Github/LightGBM/lightgbm', 'config=/tmp/tmphdAl6R/predict.conf']' returned non-zero exit status 1

Really appreciate your help.

Hi, that's strange, I just reinstalled pyLigthGBM, runned notebook and all works like a sharm.

Maybe it has something with LigthGBM version that you use? Can you specify version of LigthGBM

OK. I clone the latest lightGBM and remake it, its runs ok now. thank you.

By the way, are you participate in Kaggle/Allstate ? How about your Public Leadebroard ?

Yes I like to spend my free time on Kaggle, don't look on LB, there's still 2 months to go. Make sure that you have good train set with good features for training. But because you are asking you can find me by my name Evgeny Bazarov, for a moment it's a result of XGBoost model on raw features.