Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory saturation during recording writing to a different file format #1644

Open
FrancescoNegri opened this issue Feb 17, 2025 · 2 comments
Open
Labels

Comments

@FrancescoNegri
Copy link

Describe the bug
When Neo is used to load and export proprietary formats in .nwb files, the source electrophysiological recording is fully loaded into memory, converted and ultimately saved in the output format.
This procedure is particularly problematic when converting large files, where the process is interrupted due to saturation of the available memory.
Unlike Neo, the neuroconv package sequentially converts smaller chunks of the original signal, avoiding any memory-related issue.
Wouldn't it be appropriate to modify the NWBIO class so that it follows the same approach as neuroconv?
These considerations hold for any output format, as reading the whole electrophysiological recording in many cases might be unfeasible.

To Reproduce
The issue arises when reading and subsequently writing any large enough recording to .nwb. In my case, I tried to export a .pl2 Plexon file with a size of about 50 GB.

Expected behaviour
The desirable behaviour, as previously stated, would be a chunk-by-chunk conversion, without the need to load in-memory the whole recording, avoiding memory saturation and subsequent process interruption.

Environment:

  • OS: Ubuntu (in a Windows-based Docker container)
  • Python version: 3.12
  • Neo version: 0.14.0
@zm711
Copy link
Contributor

zm711 commented Feb 20, 2025

@apdavison manages nwb here. So he's best to comment here.

@h-mayorquin
Copy link
Contributor

As a maintainer of neuroconv I am curious on whether neuroconv is missing any feature that would make you use neo instead of neuroconv.

Implementing buffered reading might be a major effort on neo side, effort that might be better spread to other cases that are not solved in the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants