-
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] Re-enable scikit-learn 0.22+ support #2949
Conversation
@jameslamb Can you please help with failing R test on macOS?
|
This reverts commit 8b4db08.
@jameslamb I tried to change CRAN repo The same error:
|
looking right now |
If you rebase to |
@henry0312 Please take a look when have time |
Sure, I'm going to check tomorrow |
@@ -276,7 +276,7 @@ def run(self): | |||
install_requires=[ | |||
'numpy', | |||
'scipy', | |||
'scikit-learn<=0.21.3' | |||
'scikit-learn!=0.22.0' |
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.
is this 'scikit-learn~=0.22,!=0.22.0'
?
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.
Sorry, I can't find ~
in the setuptools
docs. Can you please clarify what do you mean?
A version specifier is one of the operators <, >, <=, >=, == or !=, followed by a version identifier.
https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-dependencies
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.
Version specifiers
https://www.python.org/dev/peps/pep-0440/#version-specifiers
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.
OK. I guess that this specifier is not compatible with setuptools
as it is not listed there, is it?
Also, why do we need it? We are compatible with all (reasonable) versions except 0.22.0
.
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.
ping @henry0312
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.
though I don't think the policy is common in software engineering.
It's kind of debatable statements. And I don't think that this PR is a good place to discuss it. I think we should create a separate issue where we should at least get opinions of other maintainers before changing the current policy.
we should check its compatibility and will add suuport of it in series.
In ideal situation, yes! You are absolutely right! But given that we are lacking human resources to do it in time, I suppose that it will be simply abandoned in the near future. Which will result in very old dependencies of LightGBM.
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.
Unless you're ready to release a new version of LightGBM every time a new minor version or patch for a dependency is released, of course.
Absolutely agree! It is definitely not our case when only 2-3 maintainers work actively at the same time.
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.
@ekerazha @StrikerRUS I don't mean all of the future versions wont' be allowed, but only the future versions that can breaks backward compatibility (in other words, a release changes major version), which version specifiers (i.e. scikit-learn~=0.22,!=0.22.0
or scikit-learn>=0.22, == 0.*
) realizes.
And is LightGBM an almost end-user products? I think so.
I don't think sklearn is following SemVer.
oh, really...? Actually, I'm not sure.
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.
And is LightGBM an almost end-user products? I think so.
LightGBM is a library, a travel website which uses LightGBM to recommend travels would be the end-user product.
oh, really...? Actually, I'm not sure.
scikit-learn had breaking API changes in minor versions, so it's not following SemVer.
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.
@henry0312 I guess 0.22
is a minor release, but it broke backward compatibility.
Again, please let's move all our discussion to a separate issue where everyone will be able to comment. It's very hard to find it here and I want to merge this PR ASAP to enable the latest scikit-learn support.
By the way, why is there the same (similar?) PR, #2946? |
That PR only reverts version constraint. This one fixes some new tests in addition. Refer to #2946 (comment). |
Thank you for your explanation. I see 😄 |
@StrikerRUS @henry0312 is this ready to merge? |
@guolinke @StrikerRUS yes it is. |
Skip failing
check_no_attributes_set_in_init
test, refer to #2628 (comment).Minor refactoring to pass new
check_sample_weights_not_an_array
test.Reverted #2637. Fixed #2628. Closed #2946.