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] lgb.cv ignores verbose argument #4667

Closed
david-cortes opened this issue Oct 9, 2021 · 4 comments · Fixed by #4903
Closed

[R-package] lgb.cv ignores verbose argument #4667

david-cortes opened this issue Oct 9, 2021 · 4 comments · Fixed by #4903
Assignees

Comments

@david-cortes
Copy link
Contributor

In the R version, function lgb.cv has a parameter verbose with this description:

verbosity for output, if <= 0, also will disable the print of evaluation during training

However, regardless of what I pass for verbose, it will still print [Info] and higher-up messages:

library(lightgbm)
data("agaricus.train")
pool = lgb.Dataset(agaricus.train$data, label=agaricus.train$label)
params = list(
    objective_type="binary",
    force_row_wise=TRUE,
    seed=123
)
lgb.cv(params, pool, verbose=0)
[LightGBM] [Info] [binary:BoostFromScore]: pavg=0.486412 -> initscore=-0.054366
[LightGBM] [Info] Start training from score -0.054366
[LightGBM] [Warning] No further splits with positive gain, best gain: -inf
[LightGBM] [Info] [binary:BoostFromScore]: pavg=0.476969 -> initscore=-0.092189
[LightGBM] [Info] Start training from score -0.092189
[LightGBM] [Warning] No further splits with positive gain, best gain: -inf
[LightGBM] [Info] [binary:BoostFromScore]: pavg=0.482957 -> initscore=-0.068198
[LightGBM] [Info] Start training from score -0.068198
[LightGBM] [Warning] No further splits with positive gain, best gain: -inf
...
@jameslamb
Copy link
Collaborator

Thanks for opening this! Definitely looks like a bug.

Are you interested in submitting a pull request? If not, I'll probably pick this up this weekend.

@david-cortes
Copy link
Contributor Author

I'll better leave it to you.

@jameslamb jameslamb self-assigned this Dec 20, 2021
@jameslamb
Copy link
Collaborator

Assigning this to myself to signal that I'm working on it right now.

jameslamb added a commit that referenced this issue Jan 6, 2022
* fixes

* revert debugging code

* add test

* check for LightGBM explicitly

* empty commit

* revert unnecessary line deletion

* respect verbose everywhere and update params for constructted dataset

* Update R-package/R/lgb.Dataset.R

Co-authored-by: Nikita Titov <[email protected]>

Co-authored-by: Nikita Titov <[email protected]>
@github-actions
Copy link

This issue 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 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants