[FIX] Making the MOABB dataset work with BIDS cache - #694
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #694 +/- ##
==========================================
- Coverage 87.25% 87.17% -0.09%
==========================================
Files 76 76
Lines 6835 6846 +11
==========================================
+ Hits 5964 5968 +4
- Misses 871 878 +7 |
| # find events from the stim channel | ||
| stim_channels = mne.utils._get_stim_channel(None, raw.info, raise_error=False) | ||
| if len(stim_channels) > 0: | ||
| # returns an empty array if none found | ||
| events = mne.find_events(raw, shortest_event=0, verbose=False) | ||
| else: | ||
| events, _ = mne.events_from_annotations(raw, verbose=False) |
There was a problem hiding this comment.
| # find events from the stim channel | |
| stim_channels = mne.utils._get_stim_channel(None, raw.info, raise_error=False) | |
| if len(stim_channels) > 0: | |
| # returns an empty array if none found | |
| events = mne.find_events(raw, shortest_event=0, verbose=False) | |
| else: | |
| events, _ = mne.events_from_annotations(raw, verbose=False) | |
| events, _ = mne.events_from_annotations(raw, verbose=False) |
I think we should always get the events using the annotations (with NeuroTechX/moabb#696, the annotations are always set in raw objects obtained from moabb)
There was a problem hiding this comment.
For some strange reason, it does not happen in all the datasets. I can try to run without this and fix this on the moabb side.
|
Hey Pierre, It is falling already with the fake dataset, as I need this to run some stuff. For me, we merge this PR and open one issue on moabb to solve this in the future. It is a problem on the moabb side. |
PierreGtch
left a comment
There was a problem hiding this comment.
@bruAristimunha I'm not sure I understand why this PR is now needed; what changed on the MOABB/MNE side?
But let's merge if you think it is best.
We should take a deep look at versions compatibility with MOABB before making the next braindecode release
|
I will take some time to merge this pr, don't worry |
Code to test: