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

[python-package] remove CVBooster._append() #6057

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

jameslamb
Copy link
Collaborator

Proposes removing CVBooster._append(). That method was a one-line wrapper around just appending directly to CVBooster.boosters... I don't think the additional indirection is worth it.

This PR proposes removing that method to make the cv() code a bit easier to understand.

@@ -514,11 +510,11 @@ def _make_n_folds(
train_set, valid_set, tparam = fpreproc(train_set, valid_set, params.copy())
else:
tparam = params
cvbooster = Booster(tparam, train_set)
booster_for_fold = Booster(tparam, train_set)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I found it confusing at first that this was named cvbooster but was not actually a CVBooster object.

Thought it made sense in the context of this PR to change this variable name.

@jameslamb jameslamb merged commit 32a5dbe into master Aug 23, 2023
@jameslamb jameslamb deleted the python/simplify-cvbooster branch August 23, 2023 03:13
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 Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants