-
Notifications
You must be signed in to change notification settings - Fork 580
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
[DOC] Add note about decreasing memory usage #2223
Conversation
LGTM. Thank you very much. It's a pity that you skipped CI, as we would have looked at the docs rendered by the CI. Another review by someone else? |
I wouldn't wanna merge this without looking at circleci, maybe I can start
it manually once I have a stable net connection
…On Wed, Nov 20, 2019, 13:19 Gael Varoquaux ***@***.***> wrote:
LGTM. Thank you very much. It's a pity that you skipped CI, as we would
have looked at the docs rendered by the CI.
Another review by someone else?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2223?email_source=notifications&email_token=AB6SXRH7PMR45BZ4RQCADULQUUTM7A5CNFSM4JPO2FG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEERZL5Y#issuecomment-555980279>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB6SXRE3U7UJV3CB5GSWYNTQUUTM7ANCNFSM4JPO2FGQ>
.
|
I can't force build it directly, however there is a workaround. |
Thanks for the force push @dPys |
Already one step ahead of you @kchawla-pi ! I had some further text I wanted to add so this may have turned out to be a blessing in disguise. |
Codecov Report
@@ Coverage Diff @@
## master #2223 +/- ##
=======================================
Coverage 92.36% 92.36%
=======================================
Files 149 149
Lines 18991 18991
Branches 2307 2307
=======================================
Hits 17541 17541
Misses 931 931
Partials 519 519 Continue to review full report at Codecov.
|
.. topic:: Decreasing memory used when loading Nifti images | ||
|
||
When Nifti images are stored compressed (.nii.gz), loading them directly | ||
consumes more memory. As a result, large 4D images may |
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.
Is it worth explaining why this is true ?
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.
My sense is that it may not be worth getting too much into the weeds about why. @GaelVaroquaux ?
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.
I agree. Less is more
Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu>
@GaelVaroquaux -- one final question from me on this: why not run:
every time as a default precursor to all Nilearn functions, subsequently deleting the temporary file after operations are performed? Wouldn't that reduce the memory burden universally? |
Many reasons why this would be fragile:
- It requires a system to clean up the file after, and these are
challenging to make fool proof (think: crashing in the middle of
reading)
- It will slow down the loading (though not much)
- It will take disk space, and sometimes there is none available (many
processes loading in the same time), or mkdtemp might not return the
right place (shared systems not well configured)
However, what this gets to is the tradeoff between memory usage and disk
usage, which is a classic one. The right way to do this tradeoff would be
to increase the swap. Unfortunately, in linux the swap cannot be easily
increased dynamically.
|
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.
LGTM, thank you
The docs can be viewed here: https://5013-1235740-gh.circle-artifacts.com/0/home/circleci/project/doc/_build/html/manipulating_images/input_output.html#niimg-like-objects They look good. I am merging. I just realized that I'd like this title to be bold, but I'll fix it after merge. Thanks a lot! |
Yep, well a useful hack anyway even if it doesn't scale :-) I did think about addressing this problem with swap but without being able to modify swappiness nor an interest in getting into the weeds with it, eventually just decided to try tmp. Anyway, glad to see this PR merged. Cheers |
* 'master' of github.com:nilearn/nilearn: Add testing for Nilearn setup & install & Fix the broken dependency installation (nilearn#2201) Fix uniform ball cloud test for sklearn >= 0.22 (nilearn#2175) MAINT: sklearn Deprecations (nilearn#2219) DOC: title in bold [DOC] Add note about decreasing memory usage (nilearn#2223)
…smooth-image * 'master' of https://github.com/nilearn/nilearn: (25 commits) Add testing for Nilearn setup & install & Fix the broken dependency installation (nilearn#2201) Fix uniform ball cloud test for sklearn >= 0.22 (nilearn#2175) MAINT: sklearn Deprecations (nilearn#2219) DOC: title in bold [DOC] Add note about decreasing memory usage (nilearn#2223) Rel 060b0 (nilearn#2208) Nilearn 0.6.0b0 release (nilearn#2206) Fixed the redundant & missing test case in merged PR nilearn#2035 (nilearn#2205) Modify fetch_development_fmri to fetch adults or children (nilearn#2035) Verbose doc building to ease tracking of progress & diagnose stalls (nilearn#2203) New conda env is created once conda path has been activated Conda environment is created for full-builds Refactor CircleCI config for reduced redundancy (nilearn#2204) Installation should fail on Python < 3.5 (nilearn#2198) [MRG] Add get data function (nilearn#2172) fix error when colorscale given boolean array (nilearn#2193) remove is_valid filter (nilearn#2169) Moved new entries to next release FIX: marker size issue in plot_connectome nilearn#2185 (nilearn#2186) Updated Appveyor status badge ...
…s-craddock * 'master' of https://github.com/nilearn/nilearn: (620 commits) CI: Test pre-release versions of dependencies (nilearn#2224) Fix: nilearn.image.smooth_img fails if fwhm is an ndarray (nilearn#2107) Update Python version warnings for Py35 deprecation (nilearn#2214) Fixing failure in minimum build of TravisCI (nilearn#2227) Updated missing whats_new entry Add testing for Nilearn setup & install & Fix the broken dependency installation (nilearn#2201) Fix uniform ball cloud test for sklearn >= 0.22 (nilearn#2175) MAINT: sklearn Deprecations (nilearn#2219) DOC: title in bold [DOC] Add note about decreasing memory usage (nilearn#2223) Rel 060b0 (nilearn#2208) Nilearn 0.6.0b0 release (nilearn#2206) Fixed the redundant & missing test case in merged PR nilearn#2035 (nilearn#2205) Modify fetch_development_fmri to fetch adults or children (nilearn#2035) Verbose doc building to ease tracking of progress & diagnose stalls (nilearn#2203) New conda env is created once conda path has been activated Conda environment is created for full-builds Refactor CircleCI config for reduced redundancy (nilearn#2204) Installation should fail on Python < 3.5 (nilearn#2198) [MRG] Add get data function (nilearn#2172) ... # Conflicts: # nilearn/datasets/atlas.py
...by decompressing nii's per issue #2218 at @GaelVaroquaux 's request.