-
Notifications
You must be signed in to change notification settings - Fork 46
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 usage of dss_line()
#56
Comments
Ah great! Well, I doubt I can produce a reasonable PR, but I shall try to further look into what parts of the code are particularly memory-hungry. Thanks! |
Speed might be up somewhat. It's hard to say, because I don't have a good reference for a complete data file of mine. So far I always ran out of memory before it could finish. However, this time it was quite quick for my memory to be full, so I guess it is somewhat quicker :) |
In that case I'll leave the PR open until you have had enough time to test it, ok? |
Sure! While testing it is already quite clear that the slowest part of the process (so far) are the ffts in gaussfilter: python-meegkit/meegkit/utils/sig.py Lines 348 to 354 in 7f8192a
|
Yes I came to the same conclusion. I have to do some FFTing here to compute the bias covariance, but at least now it's done over hopefully smaller matrices so it should not hog your memory as much 🤞 |
Not sure it really did save memory though. I just managed to edit the code here and there to save memory, and it did finish finally! (Beautiful Psds afterwards!). Tomorrow I shall have a somewhat more systematic look which of my edits actually did save memory, and compose a PR of them. Then you can decide what of it you want to keep and what not 😄 |
Sounds good |
quick question. Does it make more sense to start the PR based on #57, or based on master? |
you can base it on #57 |
Closed via #57 (for now) |
Thanks @eort ! |
Hi,
I came across this repository when I was looking for an implementation of ZAPline. Really nice that you took the effort to translate the original matlab package. I have played around with it on my data, and for most of it, it works really nicely.
However, one thing that worries me a bit, is the memory usage of the
dss_line()
. So far, I tried to run it on MEG data (300 channels x 1.8x10^6 samples), but there was no chance that my laptop (24GB) could offer enough memory fordss_line
to finish. Only if I cropped the data considerably it worked.Of course, eventually the scripts will run on an HPC, so memory shouldn't be a big problem there, still it is quite annoying that I can't run and check those scripts locally before exporting them to the hpc. So I was wondering whether there are some magic tricks that I can do to lower the memory footprint? Settings that I have missed or something? I tried to trace the memory consumption of the function (where I was sufficiently confident to not affect functionality), and could indeed reduce the usage here and there, but the peak is still higher than what my pc can handle.
If helpful, I can provide more information of any kind.
The text was updated successfully, but these errors were encountered: