-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Suppress LightGBM Warning #1157
Comments
it means:
|
thanks, how do you suppress these warnings and keep reporting the validation metrics using |
for sklearn interface, you can set |
@guolinke what abour lgb.cv ? Can I suppress this warning in lgb.cv? |
I think it can use in cv as well |
For cv, no parameter like "verbose". "verbose_eval" is there. But setting
it to -1 doesn't solve the problem.
I temporarily solved it by decreasing the num_leaves parameter.
|
set it in param dict, not the function arguments. |
setting 'verbose' or 'verbosity' to -1 in the param dict solves this problem for lgb.train, |
ping @StrikerRUS |
@guolinke I confirm that with UPD: Logs are shown:
No logs:
Also, instance of
|
@StrikerRUS I think we need to pass verbose parameter when creating |
Only warnings:
In the example |
Hi there, I copy the content of issue #1486 as requested by @StrikerRUS Environment infoOperating System: Linux and windows (can't test on Apple) Reproducible exampleshttps://www.kaggle.com/ogrellier/lighgbm-with-selected-features The problem only occurs with lgb.train (LGBClassifier does not exhibit the same issue) and only if eval_sets argument is provided. Let me know if you need any further info. |
Just to recap :
Hope this helps. |
With the sklearn API I still get during fit the above types of messages even of False is passed to fit() and verbose=-1 passed as dict into the initial class part of a dict. Note this is even though I am not passing (ever) boosting_type or nthread. But if I do model.get_params() I see those extra 2 parameters listed there even though I never passed them. So I assume sklearn API is adding them and then lgbm complains. |
@pseudotensor These parameters are regular arguments of the constructor, you should use them instead of aliases in params. |
yes thanks, just bit odd these main sklearn ones are listed as aliases |
I will really appreciate if everyone here will test the fix proposed in #1628 ( @goldentom42 Speaking personally about your case, passing |
Sorry but I'm not sure I understand your statement: I should remove silent=True in the lgb.Dataset() call and set verbose: - 1 when calling lgb.train ? |
@goldentom42 Please see the example:
|
Hi @StrikerRUS, tested LightGBM on Kaggle (they would normally have the latest version) and I don't see the warnings anymore with verbose : -1 in params. On LightGBM 2.1.2, setting verbose to -1 in both Dataset and lightgbm params make warnings disappear. Hope this helps. |
@goldentom42 Thanks for your reply! It seems to be that Kaggle uses the latest available release at PyPI, not the We are going to merge the fix into the |
I still get |
@joseortiz3 We use alphabet order to override the parameters, therefore, num_therads will override n_jobs |
thanks for the message in this issue. In a word, Could we understand it as the model would be run OK although such message printed out. |
The following line is replicated throughout the training for each iteration and it doesn't seem to be generating through Python's standard (warnings)[https://docs.python.org/3/library/warnings.html] module:
[LightGBM] [Warning] No further splits with positive gain, best gain: -inf
How can I suppress this warning? It is generated here. Also, if possible, can you tell me the meaning of this warning?
The text was updated successfully, but these errors were encountered: