Skip to content
Snippets Groups Projects

Adds a pool to the reconstruction

Merged Gregory Ashton requested to merge add-pool-to-reconstruction into master
All threads resolved!

Adds a pool option to the reconstruction of the marginalized parameters

This also adds a generic npool interface to multithreading which will work with both dynesty and ptemcee current implementations via the equivalent kwargs.

Merge request reports

Pipeline #125099 passed

Pipeline passed for 2c7b5ce8 on add-pool-to-reconstruction

Test coverage 58.00% (0.00%) from 1 job
Approval is optional
Ready to merge by members who can write to the target branch.

Merge details

  • 1 commit will be added to master.
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Colm Talbot
  • Gregory Ashton added 1 commit

    added 1 commit

    • 89523f33 - Apply suggestion to bilby/gw/conversion.py

    Compare with previous version

  • Gregory Ashton added 1 commit

    added 1 commit

    • 21588a2c - Apply suggestion to bilby/gw/conversion.py

    Compare with previous version

  • Gregory Ashton resolved all threads

    resolved all threads

  • Gregory Ashton added 1 commit

    added 1 commit

    • d376e6e5 - Fix accidental change to the variable ame

    Compare with previous version

  • Gregory Ashton resolved all threads

    resolved all threads

  • I should also add that I ran this on the marginalized_likelihood example with npool=3 and found about a factor 3 speedup in the reconstruction :)

  • Gregory Ashton added 1 commit

    added 1 commit

    • 8890eb14 - Revert change from map -> imap

    Compare with previous version

    • Resolved by Colm Talbot

      @colm.talbot I reverted your proposed change from map to map. I tested the proposal and by itself, it errors out. This is because imap returns a generator. You can remedy this by wrapping it in a list(). However, I noticed in the documentation for imap it says Equivalent of map()-- can be MUCH slower thanPool.map(). So, I did a test run and found that map takes 03:23, imap (with a list wrap) took 05:47. For this reason I think we should keep with the map.

  • Colm Talbot resolved all threads

    resolved all threads

  • Colm Talbot approved this merge request

    approved this merge request

  • mentioned in merge request bilby_pipe!325 (merged)

  • Colm Talbot unapproved this merge request

    unapproved this merge request

  • Colm Talbot
  • There are a few docstrings that should be updated to include the new npool argument.

  • Gregory Ashton added 1 commit

    added 1 commit

    • de0d44dd - Add doc strings and add npool to cpnest

    Compare with previous version

  • Gregory Ashton resolved all threads

    resolved all threads

  • Okay, I've run a few more involved checks using the marginalized_likelihood.py example. Here is the posterior running with npool=1 and npool=4

    run sampling time reconstruction time
    npool=1 36s 10m 15s
    npool=4 14s 2m 18s

    And this is the posterior confirming that things get generated correctly.

    check

    Finally, I ran with a reference frequency of 35Hz and double-checked that the result.posterior['reference_frequency'] is indeed 35Hz. (This was a bug that afflicted pbilby when we implemented parallelization of the reconstruction).

  • Gregory Ashton resolved all threads

    resolved all threads

  • Gregory Ashton added 1 commit

    added 1 commit

    Compare with previous version

  • Gregory Ashton changed milestone to %0.6.8

    changed milestone to %0.6.8

  • Colm Talbot approved this merge request

    approved this merge request

  • Gregory Ashton approved this merge request

    approved this merge request

  • Gregory Ashton mentioned in commit 775d682a

    mentioned in commit 775d682a

  • Please register or sign in to reply
    Loading