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-package] fix R examples and lgb.plot.interpretation() #3002

Merged
merged 4 commits into from
Apr 21, 2020

Conversation

jameslamb
Copy link
Collaborator

*NOTE: Moving #2999 over here (based on a LightGBM branch) so we can test readthedocs builds. See #2999 (comment)


See comments from @StrikerRUS

A few of the R examples are broken right now. These weren't caught by tests because one is only a warning, one is a plot that is generated successfully but is incorrect, and one is an issue specific to our readthedocs builds.

I think the issue for lgb.cv() is #2715. In that issue we found that data.table 1.11.4 and R 3.6.0 lead to a data.table error ending in column or argument 2 is NULL. I think this can be fixed by upgrading to the data.table 1.12.1 in conf.py.

To fix the lgb.set.categorical() example, I changed file names across several examples to be sure that no two examples write to the same file name.

image

This issue with lgb.plot.interpretation() is because I made a change and forgot to use abs().

image

new plot:

image

I was not able to reproduce the data.table error in #2989 (comment). It

@StrikerRUS
Copy link
Collaborator

Building this branch right now.

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Apr 17, 2020

It is failing due to wrong R version of r-data.table.

1.11.4 is the last version compiled for R 3.5.

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StrikerRUS
Copy link
Collaborator

I believe we should bump version to 1.12 here

data.table (>= 1.9.6),

and correct the FAQ entry, because not only lgb.dl is affected
https://github.com/microsoft/LightGBM/blob/master/docs/FAQ.rst#3-error-in-datatabledatatableargument-2-is-null

@jameslamb
Copy link
Collaborator Author

I believe we should bump version to 1.12 here

data.table (>= 1.9.6),

and correct the FAQ entry, because not only lgb.dl is affected
https://github.com/microsoft/LightGBM/blob/master/docs/FAQ.rst#3-error-in-datatabledatatableargument-2-is-null

I disagree about updating the version floor. It seems that this is not specific to lgb.dl(), but I showed in #2715 (comment) that the incompatibility is more complicated than just "LightGBM doesn't work with 1.11.4". The 1.12 series is only about 15 months old, so I'm not prepared to force people to upgrade to it yet.

I do agree on updating the FAQ entry...I'll do that directly in this PR.

@jameslamb
Copy link
Collaborator Author

@StrikerRUS are you ok with the update I made to the FAQ? I think it came after your last approval.

@StrikerRUS
Copy link
Collaborator

@jameslamb I'm OK with that you are against bumping the required version. But the FAQ entry should state that in case of that error version upgrade is required anyway for someone who encoutrered it, I believe.

Sure, please do it right in this PR.

@jameslamb
Copy link
Collaborator Author

@jameslamb I'm OK with that you are against bumping the required version. But the FAQ entry should state that in case of that error version upgrade is required anyway for someone who encoutrered it, I believe.

Sure, please do it right in this PR.

ha I forgot to push the commit!! I pushed to origin (my fork) a few days ago...forgot this PR is on a LightGBM branch. My ask "are you ok with the update" probably was confusing, sorry!

Here it is: 0eb0243

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see! FAQ update looks good. Thanks a lot for fixing all issues!

@jameslamb
Copy link
Collaborator Author

Since this one is a user-facing fix (fixing lgb.plot.interpretation()) and a non-controversial one, I feel ok merging it without an approval from an R maintainer.

Thanks for the help @StrikerRUS !

@jameslamb jameslamb merged commit 9478e52 into master Apr 21, 2020
@StrikerRUS StrikerRUS deleted the jameslamb/fix/r-examples branch April 21, 2020 21:49
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants