Repository: sktime/sktime

Issue:
[BUG] CI failures when loading from UEA time series classification data repo
The notebook CI seems to have started failing without any related code change prior.

The failure occurs when attempting to load the `Yoga` dataset, with exception

```
Invalid dataset name =Yoga is not available on extract path =None. Nor is it available on [https://timeseriesclassification.com/.](https://timeseriesclassification.com/)
```

The code snippet that causes the error seems to be

```python
from sktime.datasets import load_UCR_UEA_dataset

X, y = load_UCR_UEA_dataset(name="Yoga", return_X_y=True)
```

but this seems to work fine locally.

Update: most datasets no longer work locally either, see below.


Discussion:
* seems to be zip corruption? It seems to be a deterministic, certain failure, not stochastic.
* There is only one change in versions that I can spot, since the lats successful CI: `precommit` to 3.3.3
Hm, it would appear that most of the datasets listed in

`from sktime.datasets.tsc_dataset_names import univariate`

no longer work.

The few ones still working are those used in most notebooks and tests, i.e., `OSULeaf` or `PLAID`, which is probably why this did not raise a test failure earlier.

The most likely explanation seems to be a change on the side of the UEA time series classification data repository.
Perhaps it got deprecated.
Exact time where this failure started can be narrowed down:

* the last passing CI on the notebooks I can find started around June 14, 16:50 GMT/UTC, here: https://github.com/sktime/sktime/pull/4700/commits/1db1d7226429ee09c06bcd8317fe454b0a3bd16c
* the first failing CI on the notebooks I can find started around June 14, 17:30 GMT/UTC, here: https://github.com/sktime/sktime/actions/runs/5263156381/jobs/9513039895
What is quite odd: we are testing the loaders punctually, with the following:

(in `datasets.tests.test_single_problem_loaders`)

```python
    load_acsf1,
    load_arrow_head,
    load_basic_motions,
    load_italy_power_demand,
    load_japanese_vowels,
    load_osuleaf,
    load_plaid,
    load_unit_test,
```

These are all functioning and passing!

Whereas, the 100 other datasets are now all failing - including one instance in the notebooks ("Yoga") which was not tested in the `pytest` test suite.

What source of error could possibly make the 8 tested in the `pytest` framework still pass, while the 100 others now all fail?
If it is a connection failure, might just be best to wait.
Is the link correct in `_data_io.py`? It seems to be different from the one used here in `aeon` repo, which works.

https://github.com/sktime/sktime/blob/533ec06eaaa5e1a715e355e23a44d908f9964b7f/sktime/datasets/_data_io.py#L198

vs

https://github.com/aeon-toolkit/aeon/blob/02f9519c614e8ff89395ab8b0e42f6117a5f2b2a/aeon/datasets/_data_loaders.py#L452
Well, that explains it. Tony Bagnall changed the path to `"https://timeseriesclassification.com/ClassificationDownloads/%s.zip"` without deprecation warning.

This was accompanied by a change of the data paths into that directory, except the ones that are covered by `pytest` in the `sktime` tests.

Resolving patch:
diff --git a/sktime/datasets/_data_io.py b/sktime/datasets/_data_io.py
--- a/sktime/datasets/_data_io.py
+++ b/sktime/datasets/_data_io.py
@@ -195,7 +195,10 @@ def _load_dataset(name, split, return_X_y, return_type=None, extract_path=None):
         ):
             # Dataset is not already present in the datasets directory provided.
             # If it is not there, download and install it.
-            url = "https://timeseriesclassification.com/Downloads/%s.zip" % name
+            url = (
+                "https://timeseriesclassification.com/"
+                f"ClassificationDownloads/{name}.zip"
+            )
             # This also tests the validitiy of the URL, can't rely on the html
             # status code as it always returns 200
             try:


Test patch:
diff --git a/sktime/datasets/tests/test_single_problem_loaders.py b/sktime/datasets/tests/test_single_problem_loaders.py
--- a/sktime/datasets/tests/test_single_problem_loaders.py
+++ b/sktime/datasets/tests/test_single_problem_loaders.py
@@ -12,6 +12,7 @@
     load_japanese_vowels,
     load_osuleaf,
     load_plaid,
+    load_UCR_UEA_dataset,
     load_unit_test,
 )
 
@@ -71,3 +72,25 @@ def test_load_numpy2d_multivariate_raises(loader):
     """Test that multivariate and/or unequal length raise the correct error."""
     with pytest.raises(ValueError, match="attempting to load into a numpy2d"):
         X, y = loader(return_type="numpy2d")
+
+
+def test_load_UEA():
+    """Test loading of a random subset of the UEA data, to check API."""
+    from sktime.datasets.tsc_dataset_names import multivariate, univariate
+
+    TOO_LARGE_DATA = ["InsectWingbeat"]
+
+    univariate = list(set(univariate).difference(TOO_LARGE_DATA))
+    multivariate = list(set(multivariate).difference(TOO_LARGE_DATA))
+
+    n_univariate = 3
+    n_multivariate = 2
+
+    univ_names = np.random.choice(univariate, n_univariate)
+    mult_names = np.random.choice(multivariate, n_multivariate)
+
+    for univ_name in univ_names:
+        load_UCR_UEA_dataset(univ_name)
+
+    for mult_name in mult_names:
+        load_UCR_UEA_dataset(mult_name)