Four dataset/paradigm defects found in a full-catalogue sweep (BNCI2022_001 interval, Kaneshiro2015 paradigm tag, RestingStateToP300Adapter default, MartinezCagigal2023Pary sub-16)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 264
- Avg merge
- 1d 13m
- Merged PRs (30d)
- 23
Description
Four smaller defects found while running every MOABB dataset through its default paradigm (a 145-dataset sweep, one subject at a time). Grouped because each is small; happy to split if you prefer.
1. BNCI2022_001: interval=[0, 90] applied to instantaneous events → 364 GiB allocation
moabb/datasets/bnci/bnci_2022_001.py:664-671
events={
"trajectory_start": 1,
"waypoint_miss": 16,
"waypoint_hit": 48,
"trajectory_end": 255,
},
interval=[0, 90], # Approximately 90 seconds per trajectory
The 90-second window is right for trajectory_start, but waypoint_hit/waypoint_miss/trajectory_end are point events and there are tens of thousands of them. Epoching all four at 90 s gives:
MemoryError: Unable to allocate 364. GiB for an array with shape (33114, 64, 23041)
33,114 events x 90 s = 828 hours of epochs per subject, from a recording that is nowhere near that long. This is not a machine-size problem — no amount of RAM makes 828 h/subject the intended result. Either the waypoint events need their own (short) interval, or they should not be in the epoching event set.
2. Kaneshiro2015 is tagged paradigm="p300" but has no P300 events
moabb/datasets/kaneshiro2015.py:101 (and :146) sets paradigm="p300", while _EVENTS (:36) is six object categories:
_EVENTS = {"human_body": 1, "human_face": 2, "animal_body": 3,
"animal_face": 4, "fruit_vegetable": 5, "inanimate_object": 6}
The P300 paradigm needs Target/NonTarget, so the dataset fails its own declared paradigm for every subject:
AssertionError: Dataset Kaneshiro2015 is not valid for paradigm
This looks like it should be a 6-class visual-categorisation dataset, not p300.
3. RestingStateToP300Adapter cannot be constructed with defaults
moabb/paradigms/resting_state.py:51 defaults events=None, and used_events() then iterates it:
def used_events(self, dataset):
return {ev: dataset.event_id[ev] for ev in self.events} # TypeError when None
So RestingStateToP300Adapter() raises. Every in-repo usage — examples, tests — passes events=list(dataset.event_id.keys()), which suggests that is the intended default and could simply be the fallback when events is None.
4. MartinezCagigal2023Pary subject 16 has an inconsistent epoch length
15 of 16 subjects process fine (404,550 epochs); subject 16 fails:
ValueError: all the input array dimensions except for the concatenation axis must match
exactly, but along dimension 2, the array at index 0 has size 601 and the array at index N differs
Subject 16's upstream archive is also ~110 MB against ~60 MB for the others, so this may be an upstream inconsistency rather than a MOABB bug — flagging it so it is at least known.
Environment: MOABB main (6eb58f6), each dataset run per-subject under its default paradigm with default parameters.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the four locations named in the report: bnci_2022_001.py:664-671, kaneshiro2015.py:36,101,146, resting_state.py:51, and the MartinezCagigal2023Pary subject-loading path. Reproduce the per-subject default-paradigm sweep, then compare the adapter’s examples and tests. Done means each defect is fixed or documented as upstream, with the affected dataset checks passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100