0

I'm trying to execute a script that uses Scikit and autosklearn on Ubuntu 20, python 3.8

I have followed the instructions to install sckit https://scikit-learn.org/stable/install.html and autosklearn installation https://automl.github.io/auto-sklearn/master/installation.html

However I'm getting

Exception ignored in: <function AutoML.__del__ at 0x7f37c6ee9160>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/autosklearn/automl.py", line 1380, in __del__
    self._backend.context.delete_directories(force=False)
AttributeError: 'AutoMLClassifier' object has no attribute '_backend'
Traceback (most recent call last):
  File "myscript.py", line 261, in <module>
    import model_snow_magn_only_package
  File "/myfolder/myscript.py", line 150, in <module>
    clf = pickle.load(open(model_name, "rb"))
ModuleNotFoundError: No module named 'sklearn.metrics.classification'

I have tried other releases of these packages but without success.

Does anyone have an idea of which releases/packages to install to make it work?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
jht
  • 141
  • 10
  • 1
    What is your sklearn version? – desertnaut Mar 16 '21 at 13:29
  • Please post the *code* that causes the error, too. – desertnaut Mar 16 '21 at 13:33
  • scikit-learn-0.22.2.post1 and auto-sklearn-0.12.4 – jht Mar 16 '21 at 17:05
  • and the code is clf = pickle.load(open(model_name, "rb")) where model_name is a sav file containing our model – jht Mar 16 '21 at 17:11
  • According to the [requirements](https://github.com/automl/auto-sklearn/blob/master/requirements.txt) of auto-sklearn, it should be `scikit-learn>=0.24.0`. – desertnaut Mar 16 '21 at 17:48
  • also tried, but same result File "/usr/local/lib/python3.8/dist-packages/autosklearn/automl.py", line 1380, in __del__ self._backend.context.delete_directories(force=False) AttributeError: 'AutoMLClassifier' object has no attribute '_backend' Traceback (most recent call last): File "test.py", line 6, in clf = pickle.load(open(model_name, "rb")) ModuleNotFoundError: No module named 'sklearn.metrics.classification' Requirement already satisfied: scikit-learn<0.25.0,>=0.24.0 in /usr/local/lib/python3.8/dist-packages (from auto-sklearn) (0.24.1) – jht Mar 16 '21 at 18:22

0 Answers0