Skip to content

Commit 5116a3b

Browse files
committed
[ENH] Fix dataset root path (#3088)
1 parent eaa51b4 commit 5116a3b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

aeon/datasets/_data_loaders.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import zipfile
2424
from datetime import datetime
2525
from http.client import IncompleteRead, RemoteDisconnected
26+
from pathlib import Path
2627
from urllib.error import HTTPError, URLError
2728
from urllib.parse import urlparse
2829
from urllib.request import Request, urlopen, urlretrieve
@@ -40,7 +41,7 @@
4041
from aeon.utils.conversion import convert_collection
4142

4243
DIRNAME = "data"
43-
MODULE = os.path.join(os.path.dirname(aeon.__file__), "datasets")
44+
MODULE = Path(aeon.__file__).parent / "datasets"
4445

4546
CONNECTION_ERRORS = (
4647
HTTPError,

aeon/datasets/_single_problem_loaders.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
]
2525

2626
import os
27+
from pathlib import Path
2728

2829
import numpy as np
2930
import pandas as pd
@@ -32,7 +33,7 @@
3233
from aeon.datasets._data_loaders import _load_saved_dataset, _load_tsc_dataset
3334

3435
DIRNAME = "data"
35-
MODULE = os.path.dirname(__file__)
36+
MODULE = Path(__file__).parent
3637

3738

3839
def load_gunpoint(split=None, return_type="numpy3d"):

aeon/datasets/dataset_collections.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@
3434
"get_available_tsf_datasets",
3535
]
3636
import os
37+
from pathlib import Path
3738

3839
import aeon
3940
from aeon.datasets.tsc_datasets import multivariate, univariate
4041
from aeon.datasets.tser_datasets import tser_monash, tser_soton
4142
from aeon.datasets.tsf_datasets import tsf_all
4243

43-
MODULE = os.path.join(os.path.dirname(aeon.__file__), "datasets")
44+
MODULE = Path(aeon.__file__).parent / "datasets"
4445

4546

4647
def get_available_tser_datasets(name="tser_soton", return_list=True):

0 commit comments

Comments
 (0)