aeon icon indicating copy to clipboard operation
aeon copied to clipboard

[BUG] AEON does not work with tensorflow 2.13

Open rruizdeaustri opened this issue 9 months ago • 3 comments

Describe the bug

Dear authors, I can't run the LITE model in aeon with tensorflow 2.13

Thanks !

Steps/Code to reproduce the bug

from aeon.datasets import load_classification
from aeon.classification.deep_learning import LITETimeClassifier

xtrain, ytrain = load_classification(name="Coffee", split="train")
xtest, ytest = load_classification(name="Coffee", split="test")


clf = LITETimeClassifier(n_classifiers=5)

clf.fit(xtrain, ytrain)

print(clf.score(xtest, ytest))

Expected results

I don't know since it does not work.

Actual results

File "main_aeon.py", line 10, in <module>
    clf.fit(xtrain, ytrain)
  File "/lhome/ext/ifca124/ifca1241/software/anaconda3/envs/tensorflow/lib/python3.8/site-packages/aeon/classification/base.py", line 129, in fit
    self._fit(X, y)
  File "/lhome/ext/ifca124/ifca1241/software/anaconda3/envs/tensorflow/lib/python3.8/site-packages/aeon/classification/deep_learning/_lite_time.py", line 200, in _fit
    cls.fit(X, y)
  File "/lhome/ext/ifca124/ifca1241/software/anaconda3/envs/tensorflow/lib/python3.8/site-packages/aeon/classification/base.py", line 129, in fit
    self._fit(X, y)
  File "/lhome/ext/ifca124/ifca1241/software/anaconda3/envs/tensorflow/lib/python3.8/site-packages/aeon/classification/deep_learning/_lite_time.py", line 520, in _fit
    self.history = self.training_model_.fit(
  File "/lhome/ext/ifca124/ifca1241/software/anaconda3/envs/tensorflow/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/lhome/ext/ifca124/ifca1241/software/anaconda3/envs/tensorflow/lib/python3.8/site-packages/keras/src/saving/saving_api.py", line 142, in save_model
    raise ValueError(
ValueError: The following argument(s) are not supported with the native Keras format: ['options']

Versions

No response

rruizdeaustri avatar Apr 26 '24 15:04 rruizdeaustri

Hi, thanks for raising the issue. Could you please provide the version of the other packages in your environment by pasting the output of the following function in a comment or in your answer ?

from aeon import show_versions
show_versions()

This would allow us to better diagnose your issue.

baraline avatar Apr 27 '24 08:04 baraline

Hi,

This is what I get:

ystem: python: 3.8.2 (default, Mar 25 2020, 17:03:02) [GCC 7.3.0] executable: /lhome/ext/ifca124/ifca1241/software/anaconda3/envs/tensorflow/bin/python machine: Linux-3.10.0-1160.102.1.el7.x86_64-x86_64-with-glibc2.10

Python dependencies: pip: 23.3.1 setuptools: 68.2.2 scikit-learn: 1.3.2 aeon: 0.8.1 statsmodels: None numpy: 1.24.4 scipy: 1.10.1 pandas: 2.0.3 matplotlib: None joblib: 1.4.0 numba: 0.58.1 pmdarima: None tsfresh: None

Best, Rbt

On 27 Apr 2024, at 10:25, Antoine Guillaume @.***> wrote:

Hi, thanks for raising the issue. Could you please provide the version of the other packages in your environment by pasting the output of the following function here or in your answer ?

from aeon import show_versions show_versions() This would allow us to better diagnose your issue.

— Reply to this email directly, view it on GitHub https://github.com/aeon-toolkit/aeon/issues/1477#issuecomment-2080414842, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWDLYX5IGEAPUROAEGVZCDY7NOFZAVCNFSM6AAAAABG3AC762VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBQGQYTIOBUGI. You are receiving this because you authored the thread.

rruizdeaustri avatar Apr 27 '24 16:04 rruizdeaustri

hello, it seems that its a common tensorflow issue with older versions aka apparently some issues with saving format that collapsed errors about an options parameter inside ModelCheckpoint that we use by default in aeon deep learners, is it possible that you upgrade to latest tensorflow versions ? or maybe at least tf 2.15 and try it out ?

hadifawaz1999 avatar Apr 27 '24 21:04 hadifawaz1999

hi @rruizdeaustri we have looked at this and we dont think it is feasible to make aeon backward compatible with tensorflow 2.13, so we are raising our requirements to >=2.14. Not exactly solving your issue, but we will close this issue after #1765

TonyBagnall avatar Jul 05 '24 08:07 TonyBagnall