remove from sklearn.utils.fixes import signature
abhishekshingadiya opened this issue · 9 comments
deprecated
Thanks for bringing this to my attention. I just merged an update to use signature from functions instead of the deprecated signature from sklearn.utils.fixes.
Hey there! I think there might still be an issue with this. Perhaps in the pip packaging.
The exception that I have thrown in the notebook is:
~/conda_envs/ml-cookiecutter/lib/python3.7/site-packages/recmetrics/__init__.py in <module>
----> 1 from .plots import long_tail_plot, mark_plot, mapk_plot, coverage_plot, class_separation_plot, roc_plot, precision_recall_plot
2 from .metrics import mark, coverage, personalization, intra_list_similarity, rmse, mse, make_confusion_matrix, recommender_precision, recommender_recall
~/conda_envs/ml-cookiecutter/lib/python3.7/site-packages/recmetrics/plots.py in <module>
5 from matplotlib.lines import Line2D
6 from sklearn.metrics import roc_curve, auc, precision_recall_curve, average_precision_score
----> 7 from sklearn.utils.fixes import signature
8
9
ImportError: cannot import name 'signature' from 'sklearn.utils.fixes' (/home/jovyan/conda_envs/ml-cookiecutter/lib/python3.7/site-packages/sklearn/utils/fixes.py)
The version of the recmetrics
package being used is:
$ pip freeze | grep recmetrics
recmetrics==0.0.12
Think the wheel and sdist packages might need to be cleaned and resubbed to pip (maybe they were packaged with old code). Does that make sense? :)
Also encountering this problem, same recmetrics version as above
Fixed temporarily by manually applying the changes to plots.py in 1b1e5a3, and then running pip3 install funcsigs
I had to manually change in the plots.py
Instead of from sklearn.utils.fixes import signature
use from funcsigs import signature
@kartikey-singh thanks for your sharing.
i install funcsigs and replace from sklearn.utils.fixes import signature
into from funcsigs import signature
in plot.py too.
from funcsigs import signature
It's worked like a charm!
Also had this issue, replacing with from funcsigs import signature
worked for me as well.
yeah, replacing helped
I'm receiving this error and plot.py is already importing from funcsigns.
sklearn==0.24.0
recmetrics=0.1.0