My code is
from sklearn.metrics import DetCurveDisplay, RocCurveDisplay
I am currently getting the following error
Traceback (most recent call last):
File "file.py", line 1, in <module>
from action_predict import action_prediction
File "file2.py", line 24, in <module>
from sklearn.metrics import DetCurveDisplay, RocCurveDisplay
ImportError: cannot import name 'DetCurveDisplay' from 'sklearn.metrics' (/python3.8/site-packages/sklearn/metrics/__init__.py)
The code was working properly and had no issue with the import module.
P.S I was using scikit-learn 1.1 when the problem started and when the error was raised. I then downgraded to scikit-learn 0.22 because I needed this version for a module I want to execute. The error was again raised when using scikit-learn 0.22.