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

removing info printed when using xgboost #151

Closed
mlesnoff opened this issue Jan 3, 2023 · 2 comments
Closed

removing info printed when using xgboost #151

mlesnoff opened this issue Jan 3, 2023 · 2 comments

Comments

@mlesnoff
Copy link

mlesnoff commented Jan 3, 2023

Is there a way to remove all the info printed when using xgboost?

The doc https://xgboost.readthedocs.io/en/stable/parameter.html indicates:

verbosity [default=1]
Verbosity of printing messages. Valid values are 0 (silent), 1 (warning), 2 (info), 3 (debug). Sometimes XGBoost tries to change configurations based on heuristics, which is displayed as warning message. If there’s unexpected behaviour, please try to increase value of verbosity.

But doing:

using XGBoost
(X, y) = (randn(100,4), randn(100))
bst = xgboost((X, y); verbosity = 0)

does not remove the printing. I also tried verbosity = "0" and silent = "0", which does not work.

Is there a solution?

@ExpandingMan
Copy link
Collaborator

You need to also set watchlist=(;) (or some other empty collection)

@mlesnoff
Copy link
Author

mlesnoff commented Jan 3, 2023

bst = xgboost((X, y), watchlist = (;)) ;

this works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants