Skip to content

[BUG] Dependencies version checking not handling python release candidate correctly #1395

@zobelb

Description

@zobelb

Describe the bug

When using Python 3.11.0rc1, an exception is thrown stating this is not a release less than 3.12. I suspect that there being no space between 3.11.0 and rc1 is causing this version test to fail.

An exception occurred: IndividualInceptionClassifier requires python version to be <3.12, but system python version is 3.11.0rc1 (main, Aug 12 2022, 10:02:14) [GCC 11.2.0].

Steps/Code to reproduce the bug

from aeon.datasets import load_unit_test

X_train, y_train = load_unit_test(split="train")
X_test, y_test = load_unit_test(split="test")

inctime = InceptionTimeClassifier(n_epochs=20,batch_size=4)
print(inctime.fit(X_train, y_train))

Expected results

InceptionTimeClassifier(batch_size=4, n_epochs=20)

Actual results

File "/home/username/aeon_test.py", line 10, in <module>
    print(inctime.fit(X_train, y_train))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aeon/classification/base.py", line 175, in fit
    self._fit(X, y)
  File "/usr/local/lib/python3.11/dist-packages/aeon/classification/deep_learning/_inception_time.py", line 249, in _fit
    cls = IndividualInceptionClassifier(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aeon/classification/deep_learning/_inception_time.py", line 540, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/dist-packages/aeon/classification/deep_learning/base.py", line 63, in __init__
    super().__init__()
  File "/usr/local/lib/python3.11/dist-packages/aeon/classification/base.py", line 86, in __init__
    super().__init__()
  File "/usr/local/lib/python3.11/dist-packages/aeon/base/_base_collection.py", line 44, in __init__
    _check_estimator_deps(self)
  File "/usr/local/lib/python3.11/dist-packages/aeon/utils/validation/_dependencies.py", line 351, in _check_estimator_deps
    compatible = compatible and _check_python_version(obj, severity=severity)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/aeon/utils/validation/_dependencies.py", line 289, in _check_python_version
    raise ModuleNotFoundError(msg)
ModuleNotFoundError: IndividualInceptionClassifier requires python version to be <3.12, but system python version is 3.11.0rc1 (main, Aug 12 2022, 10:02:14) [GCC 11.2.0].

Versions

Python 3.11.0rc1 (main, Aug 12 2022, 10:02:14) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from aeon import show_versions;show_versions()

System:
python: 3.11.0rc1 (main, Aug 12 2022, 10:02:14) [GCC 11.2.0]
executable: /usr/bin/python
machine: Linux-6.5.0-26-generic-x86_64-with-glibc2.35

Python dependencies:
pip: 23.3.1
setuptools: 69.0.1
scikit-learn: 1.4.1.post1
aeon: 0.7.1
statsmodels: None
numpy: 1.26.2
scipy: 1.12.0
pandas: 2.0.3
matplotlib: 3.8.4
joblib: 1.3.2
numba: 0.59.1
pmdarima: None
tsfresh: None

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions