Hironsan / anago

Bidirectional LSTM-CRF and ELMo for Named-Entity Recognition, Part-of-Speech Tagging and so on.
https://anago.herokuapp.com/
MIT License
1.48k stars 371 forks source link

Deprecated joblib #136

Open StanislavPy opened 4 years ago

StanislavPy commented 4 years ago

If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.

System information

Describe the problem

In the project setup.py requirements there is a dependency on 'scikit-learn>=0.19.1', but in the module anago.preprocessing there is a dependency on joblib from sklearn.externals which is deprecated after scikit-learn version 0.23.

Source code / logs

https://github.com/Hironsan/anago/blob/80efcfe9dc6781afaa1a349c2beb6f8df95a5f47/anago/preprocessing.py#L10

 File "/usr/lib/python3.7/site-packages/anago/__init__.py", line 3, in <module>
    from anago.wrapper import Sequence
  File "/usr/lib/python3.7/site-packages/anago/wrapper.py", line 7, in <module>
    from anago.preprocessing import IndexTransformer
  File "/usr/lib/python3.7/site-packages/anago/preprocessing.py", line 9, in <module>
    from sklearn.externals import joblib
ImportError: cannot import name 'joblib' from 'sklearn.externals' (/usr/lib/python3.7/site-packages/sklearn/externals/__init__.py)
behitek commented 4 years ago

Temp fix:

pip uninstall scikit-learn
pip install scikit-learn==0.21.3