Skip to content

[MNT] Flaky Rehab-Pile loader test #3318

@MatthewMiddlehurst

Description

@MatthewMiddlehurst

Describe the issue

The rehabpile loader test fails occasionally, failing to load a file.

        if return_meta:
            meta_path = dataset_path_meta / "info.json"
            if not meta_path.exists():
                meta_url = f"{REHABPILE_ROOT_URL}{collection}/{subfolder}/info.json"
                try:
                    with urlopen(meta_url, timeout=60) as response:
>                       with open(meta_path, "wb") as out_file:
                             ^^^^^^^^^^^^^^^^^^^^^
E                       FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/aeon/aeon/aeon/datasets/local_data/classification/IRDS_clf_bn_EFL/info.json'

X          = array([[[-8.72403200e-02, -8.68067455e-02, -8.76085080e-02, ...,
         -9.22864130e-02, -9.27077572e-02, -9.0926836...27e+00,  1.70394041e+00, ...,
          1.66273996e+00,  1.66666808e+00,  1.66426463e+00]]],
      shape=(228, 75, 60))
_          = 'y'
base_path  = PosixPath('/home/runner/work/aeon/aeon/aeon/datasets/local_data')
collection = 'IRDS_clf_bn'
dataset_path_fold = PosixPath('/home/runner/work/aeon/aeon/aeon/datasets/local_data/classification/IRDS_clf_bn_EFL/0')
dataset_path_meta = PosixPath('/home/runner/work/aeon/aeon/aeon/datasets/local_data/classification/IRDS_clf_bn_EFL')
extract_path = None
file_name  = 'y_train_fold0.npy'
files_to_load = {'X': 'x_train_fold0.npy', 'y': 'y_train_fold0.npy'}
fold       = 0
local_file_path = PosixPath('/home/runner/work/aeon/aeon/aeon/datasets/local_data/classification/IRDS_clf_bn_EFL/0/y_train_fold0.npy')
meta_path  = PosixPath('/home/runner/work/aeon/aeon/aeon/datasets/local_data/classification/IRDS_clf_bn_EFL/info.json')
meta_url   = 'https://maxime-devanne.com/datasets/RehabPile/IRDS_clf_bn/EFL/info.json'
name       = 'IRDS_clf_bn_EFL'
name_parts = ['IRDS', 'clf', 'bn', 'EFL']
num_folds  = 5
response   = <http.client.HTTPResponse object at 0x7fba41239540>
return_meta = True
split      = 'train'
subfolder  = 'EFL'
task_folder = 'classification'
y          = array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...1, 2, 2, 2, 1,
       2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1,
       1, 2, 1, 2, 2, 2, 1, 2])

aeon/datasets/rehabpile_loader.py:306: FileNotFoundError

Suggest a potential alternative/fix

Figure out the issue with the test or loader.

Additional context

https://github.com/aeon-toolkit/aeon/actions/runs/22348629412/job/64669671588#step:9:853
https://github.com/aeon-toolkit/aeon/actions/runs/22350543976/job/64683505995#step:9:756

Metadata

Metadata

Assignees

No one assigned

    Labels

    datasetsDatasets and data loadersmaintenanceContinuous integration, unit testing & package distributiontestingTesting related issue or pull request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions