-
Notifications
You must be signed in to change notification settings - Fork 356
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
Optimize memory usage of pycbc_fit_sngls_split_binned #4543
Conversation
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 all looks sensible to me, a couple of minor comments
Index juggling is always a bit of a headache, but I've tried to follow it through and it looks right. The proof is in the pudding through so if you could add some before / after plots that would be great
mask_start_idx = np.zeros_like(boundaries) | ||
mask_end_idx = np.zeros_like(boundaries) | ||
for idx_start in sorted_boundary_list: | ||
boundary_idx = np.argmax(boundaries == idx_start) |
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.
Would you be able to do an argsort on boundaries above, and then translate between the two orders more easily?
@spxiwh have you pushed the actual changes to the PR branch? |
No, sorry, had a bunch of students show up in the middle of responding. I also noticed that the tests failed, so am following up on that ... will post when branch is updated. |
I've pushed the comment changes. I understand the test failure (it will fail again), but need to check with @GarethCabournDavies what to do here. |
From my perspective this should be good now (if tests pass). The example doesn't actually test this code at present ... I'll leave turning that on to a different PR. |
Co-authored-by: Thomas Dent <[email protected]>
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.
Approve, assuming it works, modulo an optional comment-shortening and the question about not using zeros_like
Comment merged and question replied to! Thanks. |
* Optimize memory usage of pycbc_fit_sngls_split_binned * Need add option here * Comments on PR * Example doesn't use code being edited! * Update bin/all_sky_search/pycbc_fit_sngls_split_binned Co-authored-by: Thomas Dent <[email protected]> --------- Co-authored-by: Thomas Dent <[email protected]>
* Read DQ flags with finer time resolution (#4547) * Read DQ flags with finer time resolution * No default sample rate for dq flags * No default sample rate for dq * Add type for frequency command line option * Optimize memory usage of pycbc_fit_sngls_split_binned (#4543) * Optimize memory usage of pycbc_fit_sngls_split_binned * Need add option here * Comments on PR * Example doesn't use code being edited! * Update bin/all_sky_search/pycbc_fit_sngls_split_binned Co-authored-by: Thomas Dent <[email protected]> --------- Co-authored-by: Thomas Dent <[email protected]> * Non-coinc ifos in minifollowup trig plots (#4548) * Update get.sh (#4532) --------- Co-authored-by: maxtrevor <[email protected]> Co-authored-by: Thomas Dent <[email protected]> Co-authored-by: Shichao Wu <[email protected]>
* Optimize memory usage of pycbc_fit_sngls_split_binned * Need add option here * Comments on PR * Example doesn't use code being edited! * Update bin/all_sky_search/pycbc_fit_sngls_split_binned Co-authored-by: Thomas Dent <[email protected]> --------- Co-authored-by: Thomas Dent <[email protected]>
* Optimize memory usage of pycbc_fit_sngls_split_binned * Need add option here * Comments on PR * Example doesn't use code being edited! * Update bin/all_sky_search/pycbc_fit_sngls_split_binned Co-authored-by: Thomas Dent <[email protected]> --------- Co-authored-by: Thomas Dent <[email protected]>
* Optimize memory usage of pycbc_fit_sngls_split_binned * Need add option here * Comments on PR * Example doesn't use code being edited! * Update bin/all_sky_search/pycbc_fit_sngls_split_binned Co-authored-by: Thomas Dent <[email protected]> --------- Co-authored-by: Thomas Dent <[email protected]>
* Optimize memory usage of pycbc_fit_sngls_split_binned * Need add option here * Comments on PR * Example doesn't use code being edited! * Update bin/all_sky_search/pycbc_fit_sngls_split_binned Co-authored-by: Thomas Dent <[email protected]> --------- Co-authored-by: Thomas Dent <[email protected]>
* Optimize memory usage of pycbc_fit_sngls_split_binned * Need add option here * Comments on PR * Example doesn't use code being edited! * Update bin/all_sky_search/pycbc_fit_sngls_split_binned Co-authored-by: Thomas Dent <[email protected]> --------- Co-authored-by: Thomas Dent <[email protected]>
* Optimize memory usage of pycbc_fit_sngls_split_binned * Need add option here * Comments on PR * Example doesn't use code being edited! * Update bin/all_sky_search/pycbc_fit_sngls_split_binned Co-authored-by: Thomas Dent <[email protected]> --------- Co-authored-by: Thomas Dent <[email protected]>
pycbc_fit_sngls_split_binned
can be a real issue with memory usage. A recent example at production scale reported 200GB of RAM usage. If we decide that we can ignore triggers with single ranking less than (say) 5.5 this can be greatly reduced .... and if you want all the triggers, you can still use the 200GB!This optimizes the memory usage based on how many triggers are needed. This is now based on
stat-threshold
and the new optionplot-lower-stat-limit
. If we could solve #4524 it would simplify the implementation here. I've tested this on a large example and the output plots are indistinguishable to me ... They wouldn't be if I'd messed up the new "idx_map" thing.