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

[python] make possibility to create Booster from string official #2098

Merged
merged 1 commit into from Apr 13, 2019

Conversation

StrikerRUS
Copy link
Collaborator

Fixed #2097.

@@ -1578,7 +1578,7 @@ def dump_text(self, filename):
class Booster(object):
"""Booster in LightGBM."""

def __init__(self, params=None, train_set=None, model_file=None, silent=False):
def __init__(self, params=None, train_set=None, model_file=None, model_str=None, silent=False):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I know that for the backward compatibility new param should be the last one. But it's too illogical to split train_set=None, model_file=None, model_str=None params (especially model_file=None, model_str=None), in which at least one should be specified by a user.

@StrikerRUS StrikerRUS merged commit 5b5b982 into master Apr 13, 2019
@StrikerRUS StrikerRUS deleted the str_model branch April 13, 2019 10:48
@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot instantiate model from a string or buffer
2 participants