dmlc / XGBoost.jl

XGBoost Julia Package
Other
288 stars 110 forks source link

Add 'silent' arg to training functions #131

Closed egenn closed 1 year ago

egenn commented 1 year ago

Defaults to false and maintains current behavior, but allows user to control whether logeval() should be run in the presence of non-empty watchlist.

ExpandingMan commented 1 year ago

Is there a reason to have a non-empty watchlist with slient=true?

I don't think so, but maybe I'm missing something?

egenn commented 1 year ago

Sorry, that was nonsense. Thought the watchlist's datasets' metrics were being saved in the object, as in a different library, but here I was doing that manually. Working on a wrapper with custom early stopping and lookback for tuning. Thanks to everyone for an awesome package. All the best.

ExpandingMan commented 1 year ago

It would probably behoove us to hint in the docs that one should provide an empty watchlist to silence log output, as indeed I can see how it may not be obvious that's all that argument does.

devmotion commented 1 year ago

It seems XGBoost or MLJXGBoostInterface (not sure which package is the culprit) became more verbose only recently? I noticed in the CompatHelper PRs for MLJXGBoostInterface 0.3 that due to the verbose output the new version breaks our tests: see, e.g., https://github.com/TuringLang/MCMCDiagnosticTools.jl/actions/runs/3448759371/jobs/5756052724 and the comparison of the latest tests on the master branch (https://github.com/TuringLang/MCMCDiagnosticTools.jl/actions/runs/3444081367/jobs/5746297812) and the PR (https://github.com/TuringLang/MCMCDiagnosticTools.jl/actions/runs/3448757633/jobs/5756049214).

devmotion commented 1 year ago

Since we pass verbosity = 0 to MLJ, maybe the actual problem is that this setting is not respected anymore in recent versions? Or/and maybe the logging could be disabled by default or the log-level could be changed to @debug?

ExpandingMan commented 1 year ago

I recently rewrote MLJXGBoostInterface. It's possible that I mistakenly neglected to ensure this was silenced when appropriate, indeed there are no unit tests for this.

Could you open an issue there?

devmotion commented 1 year ago

I opened https://github.com/JuliaAI/MLJXGBoostInterface.jl/issues/23.