-
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
Warning shown with verbosity=-1 #3641
Comments
Some additional info:
|
Oh, no, I think it's much simpler! It's all in config.cpp:
|
Kindly ask attention from @guolinke @chivee @shiyu1994 @btrotta to this issue. I'm afraid this issue makes debugging process in #3450 harder. |
I'm being hit by the same issue, opened #3742 to shift |
I'm also getting:
in 3.1.1 with verbosity=-1, would this one also be fixed by #3742 or should I open a new report? |
Well #3742 did not fix it. Any update on this? |
@joshi-abhishek Please provide a reproducible example that doesn't silence LightGBM after setting import lightgbm as lgb
import pandas as pd
import numpy as np
print(lgb.__version__)
X = pd.DataFrame({
"x1": np.arange(100),
"x2": np.arange(100),
})
y = X.x1 + X.x2
lgb.train({"max_depth": 10, "verbose": -1}, lgb.Dataset(X, y))
When I remove
|
@StrikerRUS I think @joshi-abhishek is right, there still are very annoying warnings showing all the time, specially when running inside a grid search. In version 3.2.1: import warnings
import numpy as np
import lightgbm as lgb
from sklearn.model_selection import GridSearchCV
X = np.random.random((1000, 20))
y = np.random.random(1000)
gs = GridSearchCV(
lgb.LGBMRegressor(verbose=-1),
dict(min_sum_hessian_in_leaf=[10, 100, 1000]),
)
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=UserWarning)
gs.fit(X, y, verbose=False) The output is:
This happens with many parameters, some aliases will throw the warning while others not. Notice that I'm already going to great lengths in order to suppress the noise:
This by itself is undesirable, but after all that boilerplate it still doesn't work as expected. |
@memeplex This is a different warning comparing to the original one in this issue.
says that you are passing param alias that has a direct equivalent in constructor arguments. #3742 didn't fix alias warning because alias checking happens during params parsing earlier than setting logging level based on parsed Lines 24 to 35 in 926526c
Please open a new issue for this. |
Done here #4518 |
When I run the above in a Optuna, I get the following warnings:
|
Why this is closed? I got same issue as @IavTavares , did you solve it ? |
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. |
According to the documentation
< 0: Fatal, = 0: Error (Warning), = 1: Info, > 1: Debug
but I'm unable to get rid of the2^max_depth > num_leaves
warning.How you are using LightGBM?
LightGBM component: Python package
Environment info
Operating System: MacOS 11.0.1 (Big Sur)
CPU/GPU model: 2,3 GHz Dual-Core Intel Core i5 / Intel Iris Plus Graphics 640 1536 MB
Python version: 3.8.6
Error message and / or logs
Reproducible example(s)
The text was updated successfully, but these errors were encountered: