Skip to content

Close matplotlib figures in the data visualizer to prevent an OOM error - #131

Open
almilder wants to merge 1 commit into
pr-2-calibrationfrom
pr-3-oom-fix
Open

Close matplotlib figures in the data visualizer to prevent an OOM error#131
almilder wants to merge 1 commit into
pr-2-calibrationfrom
pr-3-oom-fix

Conversation

@almilder

Copy link
Copy Markdown
Collaborator

Summary

  • launch_data_visualizer opened several figures per shot without ever closing them; over a long run (or many shots) these accumulate and can exhaust memory. Adds plt.close(fig) after each figure is saved, and saves the previously-unsaved temporal-comparison figure.
  • Switches the lineouts-with-background plot to gate on background:report_background instead of hardcoding background:type in ["fit", "pixel"].

Test plan

launch_data_visualizer opened several figures per shot without ever closing
them; over a long run (or many shots) these accumulate and can exhaust memory.
Adds plt.close(fig) after each figure is saved, and saves the previously-unsaved
temporal-comparison figure. Also switches the lineouts-with-background plot to
gate on background:report_background instead of hardcoding background:type in
["fit", "pixel"].
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.

1 participant