joshspeagle / dynesty

Dynamic Nested Sampling package for computing Bayesian posteriors and evidences
https://dynesty.readthedocs.io/
MIT License
347 stars 76 forks source link

Batch fixes #326

Closed segasai closed 3 years ago

segasai commented 3 years ago

get rid of dlog_batch internal variable put in the dlogz=0.01 function parameter (currently not available from the outside yet) Also prevent spurious warnings in the case we are sampling the 'top' part of the posterior. In that case I set the upper logl limit to be +inf. And if that's the case I'm not checking that logl is above loglmax. addresses #325

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1206199408


Changes Missing Coverage Covered Lines Changed/Added Lines %
py/dynesty/utils.py 1 2 50.0%
py/dynesty/sampler.py 13 15 86.67%
<!-- Total: 55 58 94.83% -->
Files with Coverage Reduction New Missed Lines %
py/dynesty/utils.py 1 85.74%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 1188386185: 0.2%
Covered Lines: 3394
Relevant Lines: 4150

💛 - Coveralls
segasai commented 3 years ago

I have also tentatively replaced the saved_run in the internal sampler to be truncated saved_run from the parent one which is I think the correct thing to do.

segasai commented 3 years ago

And finally I now coded the newly created sampler for sample_batch. There is still some amount of hacks needed, filling saved_run and setting up bounds, but I think it's still clearer and more explicit. and the outputs during the run should be more sensible, I'd believe. Without that change I just didn't feel I was confident enough in correctness of the code.

joshspeagle commented 3 years ago

Great! Let me know when I should take a look at merging this in.

segasai commented 3 years ago

I think it is ready and the 100 tests worked fine too. It is possible that I missed something that the tests don't cover, but that is always a possibility

On 2 Sep 2021 17:37, Josh Speagle @.***> wrote: This email was sent to you by someone outside the University. You should only click on links or attachments if you are certain that the email is genuine and the content is safe.

Great! Let me know when I should take a look at merging this in.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/joshspeagle/dynesty/pull/326#issuecomment-911865558, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAA2XSPFWKZZKGODJYJXAD3T76RZVANCNFSM5DHZQSPA.

The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th’ ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.

segasai commented 3 years ago

Now out of 100 runs x70 tests there is only one failure 1 FAILED tests/test_dyn.py::test_dyn Which I can't easily fix without just bumping the threshold. I'll probably keep it as it is. I hope that concludes everything that needed fixing before 1.2