-
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
[python] max_bin parameter deprecated #1046
Conversation
python-package/lightgbm/basic.py
Outdated
@@ -638,6 +639,8 @@ def _lazy_init(self, data, label=None, max_bin=None, reference=None, | |||
self.predictor = predictor | |||
if self.max_bin is not None: | |||
params["max_bin"] = self.max_bin | |||
warnings.warn('The `max_bin` parameter is deprecated and will be removed in next version. ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think next
may not be clear. Can we give a specific version number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wxchan Good idea! What about 2.0.12?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StrikerRUS ok. but we might jump some version. @guolinke can confirm this.
@StrikerRUS we can remove all function arguments in native python interface. |
@guolinke another topic: do you think we can merge booster and _InnerPredictor into one class? |
@wxchan They are designed for decoupling. |
@guolinke maybe we don't assign predictor to dataset? We can store it in Booster because there must be a new Booster when continue training. |
@StrikerRUS I think we can deprecate feature name and category = 'auto', because we don't support category keeping raw input anyway (it must be transferred to int). The extracted feature names always have lowest priority in this case. |
@wxchan it can be. However, you will need to solve the reference dataset problem. |
I think it's not necessary, because in most other cases
I think it's more not needed than not possible.
In my opinion function arguments have higher priority. @wxchan I believe you, but I'll read the code about categorical more deeper and will answer you. |
@StrikerRUS |
@guolinke Yeah, I understand it and think that it's expected behavior. Users must read function signature and Removing all function arguments will confusing: there are dozens of parameters and it will be very hard for new users to find needed among them. Function arguments is the minimum set of params for which users should pay attention firstly. |
@StrikerRUS okay, however, we should give a warning when met the duplicate. |
@guolinke Yeah, I agree! |
Do you mean that |
The warning in test_consistency is fine, the params are read from file. I think we can set higher stacklevel in warn. |
The auto is designed for pandas input, it gives user option not to transfer pandas category to int, but actually we don't support the format if not transfer. It results in three possible state: None, auto and some values, make situation too complicated. |
@wxchan I think |
@StrikerRUS sure. |
@wxchan I'm afraid I don't not understand about |
@StrikerRUS it basically means it will show where the function (which causes warning) be called. You can choose a reasonable value you like or leave it default, I tried it before, it looks odd anyway. |
@wxchan I think it's better to leave it default. |
Refer to this thread.