eegdash 0.3.1.dev51__py3-none-any.whl → 0.3.2.dev52__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of eegdash might be problematic. Click here for more details.
- eegdash/__init__.py +1 -1
- eegdash/api.py +5 -1
- eegdash/data_utils.py +15 -14
- eegdash/dataset.py +2 -2
- {eegdash-0.3.1.dev51.dist-info → eegdash-0.3.2.dev52.dist-info}/METADATA +1 -1
- {eegdash-0.3.1.dev51.dist-info → eegdash-0.3.2.dev52.dist-info}/RECORD +9 -9
- {eegdash-0.3.1.dev51.dist-info → eegdash-0.3.2.dev52.dist-info}/WHEEL +0 -0
- {eegdash-0.3.1.dev51.dist-info → eegdash-0.3.2.dev52.dist-info}/licenses/LICENSE +0 -0
- {eegdash-0.3.1.dev51.dist-info → eegdash-0.3.2.dev52.dist-info}/top_level.txt +0 -0
eegdash/__init__.py
CHANGED
eegdash/api.py
CHANGED
|
@@ -532,7 +532,7 @@ class EEGDashDataset(BaseConcatDataset):
|
|
|
532
532
|
"gender",
|
|
533
533
|
"sex",
|
|
534
534
|
],
|
|
535
|
-
cache_dir: str = "
|
|
535
|
+
cache_dir: str = "~/eegdash_cache",
|
|
536
536
|
s3_bucket: str | None = None,
|
|
537
537
|
**kwargs,
|
|
538
538
|
):
|
|
@@ -587,6 +587,10 @@ class EEGDashDataset(BaseConcatDataset):
|
|
|
587
587
|
)
|
|
588
588
|
)
|
|
589
589
|
|
|
590
|
+
self.filesystem = S3FileSystem(
|
|
591
|
+
anon=True, client_kwargs={"region_name": "us-east-2"}
|
|
592
|
+
)
|
|
593
|
+
|
|
590
594
|
super().__init__(datasets)
|
|
591
595
|
|
|
592
596
|
def find_key_in_nested_dict(self, data: Any, target_key: str) -> Any:
|
eegdash/data_utils.py
CHANGED
|
@@ -53,24 +53,24 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
53
53
|
super().__init__(None, **kwargs)
|
|
54
54
|
self.record = record
|
|
55
55
|
self.cache_dir = Path(cache_dir)
|
|
56
|
-
bids_kwargs = self.get_raw_bids_args()
|
|
56
|
+
self.bids_kwargs = self.get_raw_bids_args()
|
|
57
57
|
|
|
58
58
|
if s3_bucket:
|
|
59
59
|
self.s3_bucket = s3_bucket
|
|
60
60
|
self.s3_open_neuro = False
|
|
61
|
-
bids_root = self.cache_dir
|
|
62
|
-
self.filecache = self.cache_dir / record["bidspath"]
|
|
63
61
|
else:
|
|
64
62
|
self.s3_bucket = self._AWS_BUCKET
|
|
65
63
|
self.s3_open_neuro = True
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
|
|
65
|
+
self.filecache = self.cache_dir / record["bidspath"]
|
|
66
|
+
|
|
67
|
+
self.bids_root = self.cache_dir / record["dataset"]
|
|
68
68
|
|
|
69
69
|
self.bidspath = BIDSPath(
|
|
70
|
-
root=bids_root,
|
|
70
|
+
root=self.bids_root,
|
|
71
71
|
datatype="eeg",
|
|
72
72
|
suffix="eeg",
|
|
73
|
-
**bids_kwargs,
|
|
73
|
+
**self.bids_kwargs,
|
|
74
74
|
)
|
|
75
75
|
|
|
76
76
|
self.s3file = self.get_s3path(record["bidspath"])
|
|
@@ -78,6 +78,7 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
78
78
|
# Temporary fix for BIDS dependencies path
|
|
79
79
|
# just to release to the competition
|
|
80
80
|
if not self.s3_open_neuro:
|
|
81
|
+
self.bids_dependencies_original = self.bids_dependencies
|
|
81
82
|
self.bids_dependencies = [
|
|
82
83
|
dep.split("/", 1)[1] for dep in self.bids_dependencies
|
|
83
84
|
]
|
|
@@ -95,12 +96,9 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
95
96
|
)
|
|
96
97
|
if not self.s3_open_neuro:
|
|
97
98
|
self.s3file = re.sub(r"(^|/)ds\d{6}/", r"\1", self.s3file, count=1)
|
|
98
|
-
self.filecache = re.sub(
|
|
99
|
-
r"(^|/)ds\d{6}/", r"\1", str(self.filecache), count=1
|
|
100
|
-
)
|
|
101
|
-
self.filecache = Path(self.filecache)
|
|
102
99
|
|
|
103
100
|
self.filecache.parent.mkdir(parents=True, exist_ok=True)
|
|
101
|
+
|
|
104
102
|
filesystem.download(self.s3file, self.filecache)
|
|
105
103
|
self.filenames = [self.filecache]
|
|
106
104
|
|
|
@@ -111,8 +109,11 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
111
109
|
filesystem = s3fs.S3FileSystem(
|
|
112
110
|
anon=True, client_kwargs={"region_name": "us-east-2"}
|
|
113
111
|
)
|
|
114
|
-
for dep in self.bids_dependencies:
|
|
112
|
+
for i, dep in enumerate(self.bids_dependencies):
|
|
115
113
|
s3path = self.get_s3path(dep)
|
|
114
|
+
if not self.s3_open_neuro:
|
|
115
|
+
dep = self.bids_dependencies_original[i]
|
|
116
|
+
|
|
116
117
|
filepath = self.cache_dir / dep
|
|
117
118
|
# here, we download the dependency and it is fine
|
|
118
119
|
# in the case of the competition.
|
|
@@ -207,7 +208,7 @@ class EEGDashBaseRaw(BaseRaw):
|
|
|
207
208
|
metadata: dict[str, Any],
|
|
208
209
|
preload: bool = False,
|
|
209
210
|
*,
|
|
210
|
-
cache_dir: str = "
|
|
211
|
+
cache_dir: str = "~/eegdash_cache",
|
|
211
212
|
bids_dependencies: list[str] = [],
|
|
212
213
|
verbose: Any = None,
|
|
213
214
|
):
|
|
@@ -244,7 +245,7 @@ class EEGDashBaseRaw(BaseRaw):
|
|
|
244
245
|
print(f"Getting S3 path for {filepath}")
|
|
245
246
|
return f"{self._AWS_BUCKET}/{filepath}"
|
|
246
247
|
|
|
247
|
-
def _download_s3(self):
|
|
248
|
+
def _download_s3(self) -> None:
|
|
248
249
|
self.filecache.parent.mkdir(parents=True, exist_ok=True)
|
|
249
250
|
filesystem = s3fs.S3FileSystem(
|
|
250
251
|
anon=True, client_kwargs={"region_name": "us-east-2"}
|
eegdash/dataset.py
CHANGED
|
@@ -18,9 +18,9 @@ RELEASE_TO_OPENNEURO_DATASET_MAP = {
|
|
|
18
18
|
class EEGChallengeDataset(EEGDashDataset):
|
|
19
19
|
def __init__(
|
|
20
20
|
self,
|
|
21
|
-
release: str
|
|
21
|
+
release: str,
|
|
22
|
+
cache_dir: str,
|
|
22
23
|
query: dict | None = None,
|
|
23
|
-
cache_dir: str = ".eegdash_cache",
|
|
24
24
|
s3_bucket: str | None = "s3://nmdatasets/NeurIPS25",
|
|
25
25
|
**kwargs,
|
|
26
26
|
):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eegdash
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2.dev52
|
|
4
4
|
Summary: EEG data for machine learning
|
|
5
5
|
Author-email: Young Truong <dt.young112@gmail.com>, Arnaud Delorme <adelorme@gmail.com>, Aviv Dotan <avivd220@gmail.com>, Oren Shriki <oren70@gmail.com>, Bruno Aristimunha <b.aristimunha@gmail.com>
|
|
6
6
|
License: GNU General Public License
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
eegdash/__init__.py,sha256=
|
|
2
|
-
eegdash/api.py,sha256=
|
|
1
|
+
eegdash/__init__.py,sha256=Nfsbk31HxH9sVIE7p14a0SwBKJWCAbWc6pHCUzDy_VA,238
|
|
2
|
+
eegdash/api.py,sha256=lYCILa69Y_RRd4_13x1Ge77FDGswnEG2DEfdPzMygAY,26865
|
|
3
3
|
eegdash/data_config.py,sha256=OS6ERO-jHrnEOfMJUehY7ieABdsRw_qWzOKJ4pzSfqw,1323
|
|
4
|
-
eegdash/data_utils.py,sha256
|
|
5
|
-
eegdash/dataset.py,sha256=
|
|
4
|
+
eegdash/data_utils.py,sha256=h1FLCTjRj2JDn6IFnVgWrogDYnHFR4mcuDF23KNtLZI,24530
|
|
5
|
+
eegdash/dataset.py,sha256=GVELU-eXq9AQDzOeg6Lkykd-Pctyn42e5UEcAV0Go4s,2348
|
|
6
6
|
eegdash/mongodb.py,sha256=GD3WgA253oFgpzOHrYaj4P1mRjNtDMT5Oj4kVvHswjI,2006
|
|
7
7
|
eegdash/preprocessing.py,sha256=7S_TTRKPKEk47tTnh2D6WExBt4cctAMxUxGDjJqq5lU,2221
|
|
8
8
|
eegdash/utils.py,sha256=wU9CBQZLW_LIQIBwhgQm5bU4X-rSsVNPdeF2iE4QGJ4,410
|
|
@@ -21,8 +21,8 @@ eegdash/features/feature_bank/dimensionality.py,sha256=j_Ds71Y1AbV2uLFQj8EuXQ4kz
|
|
|
21
21
|
eegdash/features/feature_bank/signal.py,sha256=3Tb8z9gX7iZipxQJ9DSyy30JfdmW58kgvimSyZX74p8,3404
|
|
22
22
|
eegdash/features/feature_bank/spectral.py,sha256=bNB7skusePs1gX7NOU6yRlw_Gr4UOCkO_ylkCgybzug,3319
|
|
23
23
|
eegdash/features/feature_bank/utils.py,sha256=DGh-Q7-XFIittP7iBBxvsJaZrlVvuY5mw-G7q6C-PCI,1237
|
|
24
|
-
eegdash-0.3.
|
|
25
|
-
eegdash-0.3.
|
|
26
|
-
eegdash-0.3.
|
|
27
|
-
eegdash-0.3.
|
|
28
|
-
eegdash-0.3.
|
|
24
|
+
eegdash-0.3.2.dev52.dist-info/licenses/LICENSE,sha256=asisR-xupy_NrQBFXnx6yqXeZcYWLvbAaiETl25iXT0,931
|
|
25
|
+
eegdash-0.3.2.dev52.dist-info/METADATA,sha256=vlhnJbk-mBMlfsTen_2zpBRpm6VNZ_2gI3I2gprYAC0,10784
|
|
26
|
+
eegdash-0.3.2.dev52.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
eegdash-0.3.2.dev52.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
|
|
28
|
+
eegdash-0.3.2.dev52.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|