Skip to content
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

MRG, MAINT: Lower memory again #8266

Merged
merged 2 commits into from
Sep 18, 2020
Merged

MRG, MAINT: Lower memory again #8266

merged 2 commits into from
Sep 18, 2020

Conversation

larsoner
Copy link
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
Copy link
Member

@agramfort agramfort left a comment

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
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
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
Copy link
Member

agramfort commented Sep 18, 2020 via email

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