From 3a92b7f162cde3e0a01b4c11bf1854e7b13e8c54 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 7 Jun 2024 17:38:50 +0200 Subject: [PATCH 1/3] Fixed url to Lee2019 --- moabb/datasets/Lee2019.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moabb/datasets/Lee2019.py b/moabb/datasets/Lee2019.py index 5e6707a59..5666a8a67 100644 --- a/moabb/datasets/Lee2019.py +++ b/moabb/datasets/Lee2019.py @@ -12,7 +12,7 @@ from moabb.datasets.base import BaseDataset -Lee2019_URL = "ftp://parrot.genomics.cn/gigadb/pub/10.5524/100001_101000/100542/" +Lee2019_URL = "https://s3.ap-northeast-1.wasabisys.com/gigadb-datasets/live/pub/10.5524/100001_101000/100542/" class Lee2019(BaseDataset): From 77773d60cf6b971219b2d469332fb00d342f6c72 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 4 Oct 2024 11:12:29 +0200 Subject: [PATCH 2/3] Fixed a bug when removing excluded datasets in benchmark.py --- moabb/benchmark.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/moabb/benchmark.py b/moabb/benchmark.py index 312223f6f..22f9c5b03 100644 --- a/moabb/benchmark.py +++ b/moabb/benchmark.py @@ -323,16 +323,19 @@ def _inc_exc_datasets(datasets, include_datasets, exclude_datasets): ) elif exclude_datasets is not None: - d = list(datasets) + d = [] # Assert if the inputs are not key_codes i.e. expected to be dataset class objects if not isinstance(exclude_datasets[0], str): # Convert the input to key_codes exclude_datasets = [e.code for e in exclude_datasets] - - # Map from key_codes to class instances - datasets_codes = [d.code for d in datasets] - for excdat in exclude_datasets: - del d[datasets_codes.index(excdat)] + + for ds in datasets: + class_inst = type(ds).__name__ + if class_inst not in exclude_datasets: + d.append(ds) + + if len(d) != len(datasets) - len(exclude_datasets): + raise Exception("Could not exclude datasets correctly. Make sure you provide the correct class names.") else: d = list(datasets) return d From 0097fdf28e2156db0131641c86660c30e0e3665b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 09:14:02 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks --- moabb/benchmark.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/moabb/benchmark.py b/moabb/benchmark.py index 22f9c5b03..329b4a7b3 100644 --- a/moabb/benchmark.py +++ b/moabb/benchmark.py @@ -328,14 +328,16 @@ def _inc_exc_datasets(datasets, include_datasets, exclude_datasets): if not isinstance(exclude_datasets[0], str): # Convert the input to key_codes exclude_datasets = [e.code for e in exclude_datasets] - + for ds in datasets: class_inst = type(ds).__name__ if class_inst not in exclude_datasets: d.append(ds) - + if len(d) != len(datasets) - len(exclude_datasets): - raise Exception("Could not exclude datasets correctly. Make sure you provide the correct class names.") + raise Exception( + "Could not exclude datasets correctly. Make sure you provide the correct class names." + ) else: d = list(datasets) return d