question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dynamic sampler bug, incorrect logl interval

See original GitHub issue

While running dynesty dynamic sampler thousands of times I’m occasionally hitting the error “cannot find live points in the required logl interval”. To debug it I put additional print there. See below:

  File "ZZZ/pyenv38/lib/python3.6/site-packages/dynesty
/dynamicsampler.py", line 1669, in run_nested
    stop_val=stop_val)
  File "ZZZ/pyenv38/lib/python3.6/site-packages/dynesty
/dynamicsampler.py", line 1775, in add_batch
    save_bounds=save_bounds):
File "ZZZ/pyenv38/lib/python3.6/site-packages/dynesty/dynamicsampler.py", line 1118, in sample_batch
    raise RuntimeError('Could not find live points in the required logl interval %f %f %f %f %f %d %d %d'%(logl_min, live_logl.min(), live_logl.max(), base_logl.min(), base_logl.max(), uidx, r, i))
RuntimeError: Could not find live points in the required logl interval 2596792.346555 2596788.423530 2596790.531368 -50000000000000000000.000000 2596790.531368 435 -501 1

The important point is logl_min is > base_logl.max(). This tells me that the sample_batch here https://github.com/joshspeagle/dynesty/blob/1a3cce6f490f275919208e3bdd154139ab20b117/py/dynesty/dynamicsampler.py#L1780 is called with the logl low boundary that is above the logl of the base run. I can’t immediately figure out why this happens. (and since the error occurs sporadically on a cluster can’t really debug it). So I’ll put it here for the moment. I wonder if the weight function is incorrect somehow since it provides the bounds…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
segasaicommented, May 6, 2021

On that topic, I think it would be good to refactor the dynamicsampler with something like this https://github.com/segasai/dynesty/commit/316a2314ccdc957504f74d2f2452bea265cad18c because currently the code is full of

new_u.append(u)
saved_u.append(u)

and it’s hard to verify correctness with so much duplication.

Plus I wasn’t 100 % sure all the relevant arrays were properly kept in sync.

0reactions
joshspeaglecommented, May 20, 2021

This should now be resolved via #248, so closing this for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dynesty — dynesty 1.2.3 documentation - Read the Docs
dynesty is a Pure Python, MIT-licensed Dynamic Nested Sampling package for estimating Bayesian posteriors and evidences. See Crash Course and Getting ...
Read more >
Postgres Interval Spring Data Dynamic Parameter not ...
I tried (interval '1 hour') * :hours and the result were incorrect (although there was no exception). I think there's a bug somewhere....
Read more >
Refresh Interval - an overview | ScienceDirect Topics
When a host or DHCP service registers a record dynamically with DNS, the record receives a timestamp. This timestamp is the foundation for...
Read more >
Dynamic field mapping | Elasticsearch Guide [8.5]
Setting the dynamic parameter to false ignores new fields, and strict rejects the document if Elasticsearch encounters an unknown field.
Read more >
Type 1 error
In other words, a type 1 error is like a “false positive,” an incorrect ... you will only make a decision after the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found