sktime: [BUG] Upgrade of sktime crashed my KNeighborsTimeSeriesClassifier code

Describe the bug Upgrade of sktime crashed my existing project which uses the KNeighborsTimeSeriesClassifier. It seems to me that there was no backwards compatibility in one of the recent upgrades for the project. (Or of course I am doing something wrong myself).

To Reproduce

knn_model = KNeighborsTimeSeriesClassifier(n_neighbors=5, metric="dtw")

Expected behavior I got the following error: ~/Documents/time_series_analysis/venv/lib/python3.8/site-packages/sktime/classification/distance_based/_time_series_neighbors.py in init(self, n_neighbors, weights, algorithm, metric, metric_params, **kwargs) 167 ) 168 –> 169 super(KNeighborsTimeSeriesClassifier, self).init( 170 n_neighbors=n_neighbors, 171 algorithm=algorithm,

TypeError: super(type, obj): obj must be an instance or subtype of type

Additional context This happened with the most recent upgrade I did.

Versions

System: python: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] executable: /home/thomas/Documents/time_series_analysis/venv/bin/python machine: Linux-5.8.0-36-generic-x86_64-with-glibc2.29

Python dependencies: pip: 20.0.2 setuptools: 44.0.0 sklearn: 0.24.0 sktime: 0.5.1 statsmodels: 0.12.1 numpy: 1.19.4 scipy: 1.5.4 Cython: None pandas: 1.1.5 matplotlib: 3.3.3 joblib: 0.17.0 numba: 0.52.0 pmdarima: None tsfresh: None

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

sorry about that, I’ll look into it