SpikeInterface / SpikeInterface/spikeinterface
Memory error while using widgets
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 847
- Forks
- 280
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 29
Description
Hello!
I am encountering a MemoryError while running the following bit of code. I faced the issue only after upgrading the spikeinterface module (previous version was 0.101.2; updated to 0.102.3). The same code worked in the previous version. Once I uninstalled the latest version and installed an older version, the code ran without errors again.
recording_layers = dict(
ps=recording_split_by_shank[0],
spatial_filt_ps=shank_wise_recording_spatial_filt[0]
)
w = sw.plot_traces(recording_layers, mode='map', time_range=[19*60, 19*60+5], backend="ipywidgets")
The MemoryError I get points to the following line within the spikeinterface module (line 166 in spikeinterface/widgets/traces.py):
list_traces = [traces * scale for traces in list_traces]
It looks like the widget code tries to load the entire recording object into memory.
Contributor guide
No contributing guide indexed for this repository
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 spikeinterface/widgets/traces.py at line 166 and reproduce the provided sw.plot_traces call with the ipywidgets backend and a limited time_range. Compare behavior between versions 0.101.2 and 0.102.3; the issue is done when plotting the time range no longer raises MemoryError by loading the entire recording into memory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100