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

R Session Aborted when using lgb.Dataset.construct() in R #2088

Closed
fabianmax opened this issue Apr 9, 2019 · 5 comments
Closed

R Session Aborted when using lgb.Dataset.construct() in R #2088

fabianmax opened this issue Apr 9, 2019 · 5 comments
Assignees

Comments

@fabianmax
Copy link

Environment info

Operating System: OSX 10.14.3

CPU/GPU model: 2.8 GHz Intel Core i7

C++/Python/R version: R 3.5.1

LightGBM version or commit hash: 2.2.4

Error message

R Session Aborted

Reproducible examples

library(lightgbm)
data(agaricus.train, package = "lightgbm")
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label)
lgb.Dataset.construct(dtrain)

Steps to reproduce

I played around with the lgb.train() functions and experienced the same R Session Aborted error while not being sure were the problem was. After checking different params and datasets, I tried to deep dive into the construction of the lgb.Dataset object. So I took the reproducible example from the lightgbm::lgb.Dataset() function's help page (see above) and experienced the same error as before (R Session Aborted).

While I did not not explicitly construct the dataset using lgb.Dataset.construct() before, I currently speculate that the error might be related to this function, instead of the actual model fitting.

@fabianmax fabianmax changed the title R Session Aborted when using lgb.Dataset.construct() in R R Session Aborted when using lgb.Dataset.construct() in R Apr 9, 2019
@jameslamb
Copy link
Collaborator

Thank you for taking the time to open this issue @fabianmax ! I will take a look tonight and see if I can reproduce.

How did you install LightGBM? Did you build from source or use a pre-compiled executable?

@fabianmax
Copy link
Author

fabianmax commented Apr 10, 2019

I build it from source based on https://github.com/Microsoft/LightGBM/tree/master/R-package.

@Laurae2
Copy link
Contributor

Laurae2 commented Apr 16, 2019

Works fine on Windows (VS17, MinGW 4.9) and Linux (gcc 8.2, icc 2019.1):

> library(lightgbm)
Loading required package: R6
> data(agaricus.train, package = "lightgbm")
> train <- agaricus.train
> dtrain <- lgb.Dataset(train$data, label = train$label)
Loading required package: Matrix
> lgb.Dataset.construct(dtrain)
>

Maybe a compiler issue or you might have installed the LightGBM R package over an opened R session which has LightGBM loaded? (and thus the files are immutable while installing and you end up with mixed versions of LightGBM in the R package, therefore crashes)

@jameslamb
Copy link
Collaborator

I agree with @Laurae2 , I have also not been able to duplicate this issue. I agree with the suggestion that you should try closing all open R sessions, then

Rscript -e "remove.packages('lightbm')"

Then re-installing and trying again.

@fabianmax
Copy link
Author

Thanks for looking into this. I did a reinstall using clang instead of gcc this time. Seems to solve the problem 👍

@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants