-
Notifications
You must be signed in to change notification settings - Fork 96
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
remove unecessary copy of large data #995
Conversation
2b93e7d
to
43b2cf8
Compare
43b2cf8
to
a0c9aae
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #995 +/- ##
==========================================
- Coverage 89.54% 89.54% -0.01%
==========================================
Files 26 26
Lines 3396 3395 -1
Branches 619 619
==========================================
- Hits 3041 3040 -1
Misses 207 207
Partials 148 148
☔ View full report in Codecov by Sentry. |
@tsalo It looks like you added this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for noticing and correcting this!
This feels like something where the edited data
was being passed out of the function, but that's not happening now and going through past versions I don't see where that might have been happening.
Thanks for your feedback! It was an easy catch when I quickly mem-profiled the code, the use of float64 is definitely making the workflow memory intensive. I guess there could be further optimization. |
Barring essential needs, I'd lead towards keeping things as float64 because the code is doing fits and divisions in multiple places and rounding the final bit of information has been shown to non-trivially reduce precision. Having float64 means are data are reliably stable to precision above float32. There is a FWIW, there's another standing memory issue ( #856 ). It's possible this fix addresses that issue, but we also identified another place where we can slightly reduce memory needs (see final comment). I'm not sure how much more memory that would save, but probably still worth implementing. Also, this PR has two approvals and can be merged. @bpinsard as the person who created the PR you are welcome to hit |
I think #856 mainly originates from a too low estimates of memory reqs passed to nipype in fmriprep. I hit such errors even with 45G of RAM. Maybe if someone familiar with the tedana internals know how many times the data get transformed/duplicated we could try to figure out a better heuristics. Though the current PR might bring the estimate to what is required. I don't think I have permissions to merge PRs on that repo. |
@bpinsard I'm working on a tedana abstract for OHBM 2024. People who contributed in the last year are welcomed as co-authors. If you want to be a co-author, let me know so that I can make sure I have appropriate info to include. |
@all-contributors please add @bpinsard for code. |
I've put up a pull request to add @bpinsard! 🎉 |
@all-contributors please add @bpinsard for code. |
@bpinsard already contributed before to code |
Changes proposed in this pull request:
investigation of memory usage originates from nipreps/fmriprep#3125