aeon-toolkit / aeon

A toolkit for machine learning from time series
https://aeon-toolkit.org/
BSD 3-Clause "New" or "Revised" License
1.01k stars 118 forks source link

[BUG] Unable to load Anomaly Detection dataset #2308

Open haskarb opened 6 hours ago

haskarb commented 6 hours ago

Describe the bug

When I fix split="train", I get below error.

Steps/Code to reproduce the bug

from aeon.datasets import load_anomaly_detection
X_train, y_train= load_anomaly_detection(("SMD", "machine-1-1"), split="train")

Expected results

Dataset should be read.

Actual results

packages\\aeon\\datasets\\_tsad_data_loaders.py:150, in load_anomaly_detection(name, split, extract_path, return_metadata)
    148 metadata = df_meta.loc[name]
    149 if split.lower() == \"train\":
--> 150     if metadata[\"train_path\"] is None or np.isnan(metadata[\"train_path\"]):
    151         raise ValueError(
    152             f\"Dataset {name} does not have a training partition. Only \"
    153             \"`split='test'` is supported.\"
    154         )
    155     dataset_path = data_folder / metadata[\"train_path\"]

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''"
}

Versions

 name         : aeon
 version      : 0.11.1
 description  : A toolkit for machine learning from time series

dependencies
 - deprecated >=1.2.13
 - numba >=0.55,<0.61.0
 - numpy >=1.21.0,<1.27.0
 - packaging >=20.0
 - pandas >=1.5.3,<2.1.0
 - scikit-learn >=1.0.0,<1.6.0
 - scipy >=1.9.0,<1.13.0
 - typing-extensions >=4.6.0
CodeLionX commented 5 hours ago

This should already be fixed by #2100 (currently in main but not yet released). Can you try to reproduce your issue on the current main-branch?

TonyBagnall commented 2 hours ago

hi, just ran this and can confirm it runs fine from main, our release will hopefully be ready in a week or so, sorry