Skip to content
Snippets Groups Projects

Pickle dump entire sampler in dynesty

Merged Colm Talbot requested to merge improve-dynesty-checkpointing into master

We've noticed some pretty horrendous issues with restarting after a checkpoint recently.

I think that this is due to not saving all of the relevant state information.

This MR ensures the whole sampler will be saved.

I also took the liberty of adding two more plots.

  • One is the run plot which dynesty produces, e.g., image
  • The other is a little less pretty but shows the bound idx, number of likelihood calls and sampling scale as a function of the nested sampling iteration, e.g.,

image

The above plot shows the issue we had, the large spike followed by a higher nc steady state is when the run was interrupted and reloaded from the resume file (note that I stopped this run before it completely converged).

This is what that plot looks like with no interruption

image

This is what the plot looks like with the new checkpointing

image

Edited by Colm Talbot

Merge request reports

Pipeline #114293 passed

Pipeline passed for 9d26b7a7 on improve-dynesty-checkpointing

Test coverage 60.00% (0.00%) from 1 job
Approval is optional

Merged by Gregory AshtonGregory Ashton 5 years ago (Mar 30, 2020 8:18am UTC)

Pipeline #114697 passed with warnings

Pipeline passed with warnings for b6c63b55 on master

Test coverage 60.00% (0.00%) from 1 job

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 resolved all threads

    resolved all threads

  • Colm Talbot added 1 commit

    added 1 commit

    • c847c753 - Improve log messages for dynesty resume

    Compare with previous version

  • Gregory Ashton resolved all threads

    resolved all threads

  • Gregory Ashton resolved all threads

    resolved all threads

  • @colm.talbot I ran it locally and hit a KerError, adding this line resolved it

            if "external_sampler" in state:
                del state['external_sampler']
  • @colm.talbot do you also think it is worth wrapping the "iteration" plot in a try except?

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading