Skip to content

MRG, MAINT: Lower memory again - #8266

Merged
larsoner merged 2 commits into
mne-tools:masterfrom
larsoner:circle
Sep 18, 2020
Merged

larsoner merged 2 commits into
mne-tools:masterfrom
larsoner:circle

Conversation

@larsoner

Copy link
Copy Markdown
Member

Another round. This time I cut down plot_mne_dspm_source_localization to deduplicate its content with other examples/tutorials, and removed a bunch of verbose='error's that we no longer need.

@larsoner larsoner added this to the 0.21 milestone Sep 16, 2020

@agramfort agramfort left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drammock merge if you're happy. it touches your tutorial text

@larsoner

Copy link
Copy Markdown
Member Author

Okay so it looks like it's not specific examples that are the problem. If I build with:

BUILD_DEV_HTML=1 mprof run --python sphinx -b html -nWT --keep-going -d _build/doctrees . _build/html

I get:

Figure_1

I'll try tacking on an xvfb-run (which uses MESA GL, just a never version than CircleCI), but this ever-increasing memory usage is not good.

@larsoner

Copy link
Copy Markdown
Member Author

Okay I think I know the culprit. If I run using the pattern plot_m, I get this:

Screenshot from 2020-09-17 19-28-25

You can see a bunch of deltas (good), but also a step at around 120 seconds (bad). The step is the problem. If I run plot_montage, I get:

Screenshot from 2020-09-17 19-37-54

Compare this to one of our "large memory" examples, plot_mne_dspm:

Screenshot from 2020-09-17 19-53-37

In other words, the plot_montage example allocates some memory that never gets freed. It creates probably 30 PyVista plots, and for some reason these must never get GC'ed properly. I'll look into it.

In the meantime I've pushed a commit here to stop building it by removing the plot_ from the name, and we'll see if the [circle full] is green. If it is, I'll merge, and we'll see if master is green. Then hopefully tomorrow I can track down what's causing the memory to linger so that we can restore the plot_. But we can also do this sometime after release, so at least CircleCI will no longer be stopping us -- hopefully we can release tomorrow!

I'll also try modifying sphinx-gallery to capture this residual memory problem...

@larsoner
larsoner merged commit 8c1c30b into mne-tools:master Sep 18, 2020
@larsoner
larsoner deleted the circle branch September 18, 2020 02:56
@agramfort

agramfort commented Sep 18, 2020 via email

Copy link
Copy Markdown
Member

marsipu pushed a commit to marsipu/mne-python that referenced this pull request Oct 14, 2020
* MAINT: Lower memory again [circle full]

* MAINT: Last tweaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants