LightGBM icon indicating copy to clipboard operation
LightGBM copied to clipboard

python example not working on 32-bit system, might be type error?

Open littleDing opened this issue 9 years ago • 5 comments

[](For bugs and unexpected issues, please provide the following information, so that we could reproduce in our system) The python examples not working on my computer, throwing an error "LightGBMError: Input data type erorr or field not found"

Environment info

Operating System: Ubuntu 14.04.5 LTS Linux version 3.13.0-79-generic (buildd@lcy01-11) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #123-Ubuntu SMP Fri Feb 19 14:28:32 UTC 2016 Linux littleding 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:28:32 UTC 2016 i686 i686 i686 GNU/Linux

CPU: Intel(R) Xeon(R) CPU E3-1225 V2

Error Message:

File "simple_example.py", line 42, in early_stopping_rounds=5) File "/usr/local/lib/python2.7/dist-packages/lightgbm-0.1-py2.7.egg/lightgbm/engine.py", line 157, in train booster = Booster(params=params, train_set=train_set) File "/usr/local/lib/python2.7/dist-packages/lightgbm-0.1-py2.7.egg/lightgbm/basic.py", line 1137, in init train_set.construct().handle, File "/usr/local/lib/python2.7/dist-packages/lightgbm-0.1-py2.7.egg/lightgbm/basic.py", line 747, in construct categorical_feature=self.categorical_feature, params=self.params) File "/usr/local/lib/python2.7/dist-packages/lightgbm-0.1-py2.7.egg/lightgbm/basic.py", line 618, in _lazy_init self.set_label(label) File "/usr/local/lib/python2.7/dist-packages/lightgbm-0.1-py2.7.egg/lightgbm/basic.py", line 972, in set_label self.set_field('label', label) File "/usr/local/lib/python2.7/dist-packages/lightgbm-0.1-py2.7.egg/lightgbm/basic.py", line 853, in set_field type_data)) File "/usr/local/lib/python2.7/dist-packages/lightgbm-0.1-py2.7.egg/lightgbm/basic.py", line 58, in _safe_call raise LightGBMError(_LIB.LGBM_GetLastError()) lightgbm.basic.LightGBMError: Input data type erorr or field not found

Reproducible examples

run the python example script

littleDing avatar Jan 07 '17 03:01 littleDing

I install on another 64-bit Ubuntu machine, works well. Checking the file "c_api.cpp" at line 540, it handles int32 and float32, is it where the problem is ?

littleDing avatar Jan 07 '17 03:01 littleDing

we didn't test it on 32bit systems. Which example you run? I will try to figure why.

guolinke avatar Jan 07 '17 03:01 guolinke

@littleDing can you try latest code?

guolinke avatar Jan 07 '17 07:01 guolinke

@guolinke The latest code does work now !

Thanks a lot & Cheers :-)

littleDing avatar Jan 10 '17 15:01 littleDing

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

github-actions[bot] avatar Aug 24 '23 03:08 github-actions[bot]