-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
lgb.cv data.table error - R package #2715
Comments
Hi @jameslamb, thanks for the update and for getting back to me! We had another colleague try yesterday with the same issue before I reported this, and it looks like the merge done for 2573 was 14 days ago so this would all be post-merge. |
Hi @abowma , I just built the latest version on
and then ran the code you provided (#2715 (comment)). For me, the code ran successfully and did not throw any error. So I think I need more information about the environment where you are seeing the issues. Could you tell me some information about the environment where this issue is showing up?
|
Hi @jameslamb Here are the details of the environment:
|
@jameslamb - was testing on another server we have and it seems like the issue may be due to the version of R. The issue didn't occur with R 3.6.0, but seems to on R 3.5.0. Though again unsure of the reason. |
Ok this is good information, thank you. I'll test on R3.5 and see if I can reproduce the issue. We only use R 3.6.x in CI so it is possible there's a 3.5.x-specific issue that hasn't been caught. We're also working through #2714 , another issue where the user is installing with |
@abowma sorry for the delay in response! I tested your sample code on R 3.5 tonight and couldn't reproduce the issue. (see #2787 for how to do this yourself). Next, I'm going to try installing Another theory I have is that the difference is due to Thanks! |
I just tried this on R 3.5.3, with I also tried removing lgbdl::lgb.dl(commit = "master",
compiler = "gcc",
repo = "https://github.com/microsoft/LightGBM") In all these different configurations, the code from #2715 (comment) ran successfully and I could not reproduce the issue. The next thing I'm going to try is literally 3.5.0 instead of 3.5.3, since you mentioned that you had that exact version (I should have just done that from the beginning). |
Hey guess what! I was able to reproduce the issue! Full steps to reproduce: 1. build the R docker container with R 3.5.0 docker build \
-t lightgbm-r-35 \
-f dockerfile-r \
--build-arg R_VERSION=3.5 \
.
docker run -it lightgbm-r-35 /bin/bash
R 2. remove lightgbm installed in there and replace with the one created by lgb.dl() remove.packages('lightgbm')
devtools::install_github("Laurae2/lgbdl")
lgbdl::lgb.dl(commit = "master"
, compiler = "vs"
, repo = "https://github.com/microsoft/LightGBM"
)
# exit the session so step 3 is in a clean session
q() 3. Run the example code R library(lightgbm)
data(agaricus.train, package='lightgbm')
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label=train$label)
params <- list(objective="regression", metric="l2")
model <- lgb.cv(params, dtrain, 10, nfold=5, min_data=1, learning_rate=1,
early_stopping_rounds=10) This yields the error you reported:
This is with Once I did that, the code above worked!! Could you please ask your colleague to update their |
To add more context to this...I just tried with R 3.6.0, building from source with But I get that same error you reported with the combination of R3.6.0, building with So while I don't understand the root cause yet, the take-away here is:
|
@jameslamb Thanks for the update! Tried updating the |
@jameslamb Can you please help to update R README with that warning about |
@abowma great! Glad it is working for you. @StrikerRUS yep I'll do that right now. |
Hi,
I have been running LightGBM 2.3.1 in R (version 3.5) for the past few months in a linux environment with no issues. My colleague has installed the package in the past few days, however when running the example code provided on the git page, they experience an error (whereas it works on my install):
Error message
Error in data.table::data.table(indices = test_indices, weight = getinfo(data, : column or argument 2 is NULL
Reproducible Code
Appreciate any help with this!
The text was updated successfully, but these errors were encountered: