Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

[HOTFIX] fix compatibility with new scikit-learn version #142

Merged
merged 1 commit into from
Jun 9, 2020
Merged

[HOTFIX] fix compatibility with new scikit-learn version #142

merged 1 commit into from
Jun 9, 2020

Conversation

StrikerRUS
Copy link
Contributor

@StrikerRUS StrikerRUS commented May 14, 2020

This PR will allow using lightning with the latest version (0.23.0) of scikit-learn.
Right now if you try to upgrade scikit-learn, lightning fails with the error about that it cannot import neither joblib nor six because they are no longer exist in sklearn.externals:

    from lightning.classification import KernelSVC
../../../virtualenv/python3.6.7/lib/python3.6/site-packages/lightning/classification.py:1: in <module>
    from .impl.adagrad import AdaGradClassifier
../../../virtualenv/python3.6.7/lib/python3.6/site-packages/lightning/impl/adagrad.py:8: in <module>
    from sklearn.externals.six.moves import xrange

six was dropped along with Python 2 support.
https://scikit-learn.org/stable/whats_new/v0.21.html#sklearn-externals

joblib is now a dependency:
https://scikit-learn.org/stable/whats_new/v0.21.html#miscellaneous

This PR should be treated as a hotfix, and ideally lightning should drop the support of Python 2 with six dependency.

@StrikerRUS
Copy link
Contributor Author

I don't think that hinge_multiclass failures are caused by changes from this PR.

@StrikerRUS StrikerRUS changed the title joblib is now a dependency and six was dropped [HOTFIX] fix compatibility with new scikit-learn version May 14, 2020
@StrikerRUS
Copy link
Contributor Author

Hello @mblondel @MechCoder @zermelozf @fabianp !

Can you please clarify the status of this great project? Is it abandoned?

This project is no longer compatible with scikit-learn and requires some hotfixes (presented in this PR).

@mblondel
Copy link
Member

mblondel commented Jun 9, 2020

Merging. Thanks a lot and sorry for the delay!

The project is indeed no longer actively maintained but hot fixes like this to follow the latest scikit-learn are very welcome.

@mblondel mblondel merged commit 782c18c into scikit-learn-contrib:master Jun 9, 2020
@StrikerRUS
Copy link
Contributor Author

@mblondel Thank you very much for your response and for merging this PR! I'm happy to help.

BTW, it will be cool to release a new version of the project at PyPI. The latest release was in 2017 and I believe there are some critical hotfixes (#142 and #134) in the master branch that could be a great candidates for a new release.

@StrikerRUS
Copy link
Contributor Author

@mblondel Hello! Is it possible to release a fresh version of this project on PyPI?

@aldanor
Copy link
Contributor

aldanor commented Dec 16, 2020

@mblondel Could this be released to PyPI?

@mblondel
Copy link
Member

@fabianp Do you think you could take care of this?

Personally, I don't have the bandwidth to do it. If nobody can do it, I suggest we remove lightning from pip and switch to a pip install git+git://github.com/... scheme instead.

@fabianp
Copy link
Member

fabianp commented Dec 16, 2020

@mblondel
Copy link
Member

Thanks so much! 🎉

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.

4 participants