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] remove Dataset setinfo() #4854

Merged
merged 6 commits into from
Dec 6, 2021
Merged

[R-package] remove Dataset setinfo() #4854

merged 6 commits into from
Dec 6, 2021

Conversation

jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented Dec 4, 2021

Contributes to #4543.

This PR proposes removing Dataset$setinfo() and the corresponding S3 method. See #4543 for background on why.

Notes for Reviewers

v3.3.0 and v3.3.1 contain a deprecation warning about this change.

@@ -227,13 +227,7 @@ Run ``lgb.unloader(wipe = TRUE)`` in the R console, and recreate the LightGBM da
Due to the pointers, choosing to not wipe variables will not fix the error.
This is a known issue: `Microsoft/LightGBM#698 <https://github.com/microsoft/LightGBM/issues/698>`__.

2. I used ``setinfo()``, tried to print my ``lgb.Dataset``, and now the R console froze!
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah ok, yes I agree with you. Fixed in 0770c94.

I checked on v3.3.0 and latest master, and there are no longer issues printing a Dataset (maybe as a result of work in #3016 ).

library(lightgbm)

data(agaricus.train, package = "lightgbm")
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label)
print(dtrain)
dtrain$construct()
print(dtrain)
dtrain$setinfo("weight", rep(1.0, nrow(train$data)))
print(dtrain)

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.

LGTM! Nice to see this cleanup!

@StrikerRUS StrikerRUS merged commit b032757 into master Dec 6, 2021
@StrikerRUS StrikerRUS deleted the remove-setinfo branch December 6, 2021 23:23
@StrikerRUS StrikerRUS mentioned this pull request Jan 6, 2022
13 tasks
@jameslamb jameslamb mentioned this pull request Oct 7, 2022
40 tasks
@github-actions
Copy link

This pull request 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 github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
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