-
Notifications
You must be signed in to change notification settings - Fork 215
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
repr CRF causes AttributeError in scikit-learn 0.24.0 (or later) #60
Comments
The workaround described here does not work for me with Python 3.10. I have tried asking pip to install sklearn<0.24, and even if I specify I'm guessing that the (probably old) version of numpy required for sklearn<0.24 is not compatible with python 3.10 for whatever reason. edit: reference on old numpy not working with Python 3.10 numpy/numpy#19033 |
I also get the same error when using some of sklearn's model selection features, specifically |
How to fix? |
Look at the pull request I opened: #69 |
hello, how can I get the training loss? |
I have a workaround, Go to the This worked on Edit: Even better, Simply install this updated repo |
I face this problem with |
I have submitted the following PR to fix this: |
Unfortunately, This repo is no longer maintained and not accepting pull requests. Their last commits were many years old. |
For the record, 0.4.0 is out addressing this issue. Maintenance of the package will continue at https://github.com/scrapinghub/sklearn-crfsuite. |
Environment
macOS
Python 3.8.6
Procedure
The tutorial code: https://sklearn-crfsuite.readthedocs.io/en/latest/tutorial.html#training
As is
Raises AttributeError
Expected
No error
Workaround
Use scikit-learn under 0.24
$ pip install -U 'scikit-learn<0.24'
In my case, scikit-learn 0.23.2 installed.
Related Information
repr(crf)
shows the following warning in scikit-learn<0.24:Change log in scikit-learn 0.24
https://scikit-learn.org/dev/whats_new/v0.24.html#sklearn-base
The CRF class seems to inherit
sklearn.base.BaseEstimator
(when it can be imported) and the values returned by the classmethod_get_param_names()
includes the attributes likekeep_tempfiles
, which are not defined in CRF class (code).The text was updated successfully, but these errors were encountered: