-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I'm not sure where to leave this, as I think it might be on the jupyter-widgets side of things. There's currently a memory leak using interactive plots. If I replot the same code several times, the memory usage climbs about ~500MB.
The code I used to test was a basic interactive plot:
import matplotlib
import nanslice.jupyter as ns
%matplotlib widget
base = ns.Layer("D:\Documents\OneDrive\Desktop\sub-1001_ses-S1_task-rest_run-1_bold.nii.gz", cmap='gist_gray')
stat = ns.Layer("D:\Documents\OneDrive\Desktop\midthal_80th_trans.nii.gz", cmap='turbo_r', clim=(0,1.0), mask_threshold=0.95)
ns.three_plane([base, stat], interactive=True)
VSCode baseline starts at:

After the first execution we get:

Which climbs to this after second execution:

I didn't notice initially as my work machine has 32GB of memory, but this is likely much more apparent to those on older/less high-end
Metadata
Metadata
Assignees
Labels
No labels