-
Notifications
You must be signed in to change notification settings - Fork 169
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
JP-3690: Switch from ModelContainer to ModelLibrary for image3 pipeline #8683
Conversation
…assign_mtwcs to library" This reverts commit 018e3ce.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8683 +/- ##
==========================================
+ Coverage 60.63% 60.77% +0.13%
==========================================
Files 372 373 +1
Lines 38375 38596 +221
==========================================
+ Hits 23270 23458 +188
- Misses 15105 15138 +33 ☔ View full report in Codecov by Sentry. |
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.
If we can get a clean regtest run that would be great but I think now we're hindered more by the unrelated miri failures.
Thanks for addressing my comments. I approve!
Another round of regtests after all the nircam image and miri image failures are fixed is here. Fingers crossed that the only failures are the same ones that show up on the nightly runs I believe that all the regression tests are unrelated |
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. I did not look into rst
or tests in much detail. But the logic looks fine.
Why there is still usage for the |
We decided to only replace container with library in the calwebb_image3 pipeline for now, where the memory performance gains are most important. There are other complications with replacing this for the spectroscopic modes too, e.g., the SourceModelContainer class that uses ModelContainer as a parent class needs to be replaced also |
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.
This is a ton of work -- thanks for tackling it! Just a few questions, especially for spectral integration, and some minor suggestions.
I skimmed through previous review comments, but didn't read them all carefully, so my apologies if anything has already been addressed.
Another round of regression tests have been started here after fixes per Melanie's review. Edit: lots of failing tests, but they match last night's nightly run |
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.
All my comments are addressed, and regtest failures match the nightly run, so LGTM.
Resolves JP-3690
Resolves JP-3619
Resolves JP-3620
Resolves JP-3621, see JP-3707 for additional work on resample memory usage beyond the scope of this ticket.
Resolves JP-3498
Work is under the epic JP-3602.
Fixes #8649
Fixes #8478
Fixes #8479
Fixes #8480
Fixes #8164
This PR is part of a larger effort to improve memory usage throughout the pipeline. Here, the AbstractModelLibrary class in stpipe is subclassed for JWST, and the pipeline steps that form the calwebb_image3 pipeline are updated to use ModelLibrary instead of ModelContainer. This facilitates ensuring that the pipeline step runs the same way whether models are loaded into memory or saved to disk.
When ModelLibrary is used with on_disk=True, memory usage is lower, both for individual pipeline steps and for calwebb_spec3 as a whole. An analysis of memory usage for each step can be found in the linked tickets JP-3619, JP-3620, and JP-3621. An analysis of the memory usage as a whole, when run on a large dataset, can be found in JP-3690.
Checklist for PR authors (skip items if you don't have permissions or they are not applicable)
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR