aeon-toolkit / aeon

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

[BUG] Intermittent test fail due to file writing #1677

Closed TonyBagnall closed 3 months ago

TonyBagnall commented 3 months ago

Describe the bug

file writing in CI causes crashes occasionally

https://github.com/aeon-toolkit/aeon/actions/runs/9521220064/job/26248164199?pr=1675 FAILED aeon/datasets/tests/test_tsad_data_loader.py::test_load_anomaly_detection_unavailable - OSError: Cannot save file into a non-existent directory: '/home/runner/work/aeon/aeon/aeon/datasets/local_data'

it should write to a temp directory instead, e.g. test_write uses something like this

    with tempfile.TemporaryDirectory() as tmp:
        write_to_tsfile(
            X=X, path=tmp, y=y, problem_name=problem_name, regression=regression
        )