sktime / sktime-dl

DEPRECATED, now in sktime - companion package for deep learning based on TensorFlow
BSD 3-Clause "New" or "Revised" License
596 stars 79 forks source link

[BUG] ModuleNotFoundError: No module named 'sktime.utils.data_container' #90

Closed aadnesd closed 8 months ago

aadnesd commented 3 years ago

Running in Google colab: from sktime_dl.deeplearning import ResNetClassifier

Gives this error: /usr/local/lib/python3.7/dist-packages/sktime_dl/utils/_data.py in <module>() 4 5 import pandas as pd ----> 6 from sktime.utils.data_container import tabularise, nested_to_3d_numpy 7 from sktime.utils.validation.series_as_features import check_X, check_X_y 8

ModuleNotFoundError: No module named 'sktime.utils.data_container'`

Additional context Installed by running: !git clone https://github.com/sktime/sktime-dl.git cd sktime-dl !git checkout dev !git pull origin dev !pip install .

Versions

Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic Python 3.7.10 (default, May 3 2021, 02:48:31) [GCC 7.5.0] NumPy 1.19.5 SciPy 1.4.1 sktime 0.6.1 sktime_dl 0.2.0

TonyBagnall commented 3 years ago

hi, thanks for that, this package is currently in a state of flux as we update it, we will take a look at this

Sugam10 commented 3 years ago

Solution 1: In the newest versions of sktime library 'sktime.utils.data_container' file does not exist.

So Go to 'sktime_dl/utils/_data.py' file

In line 6 Change:

from sktime.utils.data_container import tabularise, nested_to_3d_numpy to from sktime.utils.data_processing import from_nested_to_2d_array, from_nested_to_3d_numpy

In line 7 Change:

from sktime.utils.validation.series_as_features import check_X, check_X_y to from sktime.utils.validation.panel import check_X, check_X_y

Solution 2: OR you can install older versions of sktime to 0.4.1 which contains 'sktime.utils.data_container' file

fkiraly commented 8 months ago

obsolete, fix is importing ResNetClassifier from sktime.classification.deep_learning