Skip to content

Decreased RAM usage for read_mne_epochs - #327

Merged
rickdott merged 1 commit into
develfrom
read_mne_epochs_memory
Aug 7, 2026
Merged

Decreased RAM usage for read_mne_epochs#327
rickdott merged 1 commit into
develfrom
read_mne_epochs_memory

Conversation

@rickdott

@rickdott rickdott commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Encountered an issue that the 128GB RAM I have access to filled up when reading a 35GB dataset using read_mne_epochs()

Currently, the function keeps both the epochs and the hmp_data_format() in memory until the list comprehension finishes, requiring at least 2x the dataset size in RAM.

This fix iteratively removes the already converted epochs from memory while building the list of xr.Datasets.

@GWeindel GWeindel left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works, did it use that much RAM?

@rickdott

rickdott commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

I saw RAM usage going up to 78GB for this dataset while populating during the first step, at which it would need twice that (156GB) for the list comprehension.

I still think 78GB is a bit much for a 35GB dataset, but this is workable at least.

@rickdott
rickdott merged commit b57c398 into devel Aug 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants