Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightgbm.basic.LightGBMError: Label should be the first column in a LibSVM file #16

Closed
unavailableun opened this issue Jan 26, 2022 · 1 comment · Fixed by #17
Closed
Assignees
Labels
bug Something isn't working

Comments

@unavailableun
Copy link

If both train data and valid data exists, below exception will be raised up when constructing valid data.
It will succeed if only train data exists.

 File "/opt/miniconda/lib/python3.7/site-packages/lightgbm/engine.py", line 275, in train
    booster.add_valid(valid_set, name_valid_set)
  File "/opt/miniconda/lib/python3.7/site-packages/lightgbm/basic.py", line 2945, in add_valid
    data.construct().handle))
  File "/opt/miniconda/lib/python3.7/site-packages/lightgbm/basic.py", line 1811, in construct
    feature_name=self.feature_name, params=self.params)
  File "/opt/miniconda/lib/python3.7/site-packages/lightgbm/basic.py", line 1528, in _lazy_init
    ctypes.byref(self.handle)))
  File "/opt/miniconda/lib/python3.7/site-packages/lightgbm/basic.py", line 132, in _safe_call
    raise LightGBMError(_LIB.LGBM_GetLastError().decode('utf-8'))
lightgbm.basic.LightGBMError: Label should be the first column in a LibSVM file
@chjinche chjinche self-assigned this Jan 26, 2022
@chjinche chjinche added the bug Something isn't working label Jan 26, 2022
@chjinche chjinche linked a pull request Jan 26, 2022 that will close this issue
@chjinche
Copy link
Collaborator

chjinche commented Aug 9, 2022

Fixed PR has been merged in Jan.

@chjinche chjinche closed this as completed Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants