pints
pints copied to clipboard
Make MALA allow repeated ask()
See #996
There's no reason not!
Also cleaned up the tests a bit
Codecov Report
Merging #994 (c211e33) into master (a6a1a39) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #994 +/- ##
===========================================
Coverage 100.00% 100.00%
===========================================
Files 84 63 -21
Lines 8823 6277 -2546
===========================================
- Hits 8823 6277 -2546
Impacted Files | Coverage Δ | |
---|---|---|
pints/_mcmc/_mala.py | 100.00% <100.00%> (ø) |
|
pints/io.py | 100.00% <0.00%> (ø) |
|
pints/_core.py | 100.00% <0.00%> (ø) |
|
pints/_util.py | 100.00% <0.00%> (ø) |
|
pints/noise.py | 100.00% <0.00%> (ø) |
|
pints/_logger.py | 100.00% <0.00%> (ø) |
|
pints/_log_pdfs.py | 100.00% <0.00%> (ø) |
|
pints/toy/_cone.py | 100.00% <0.00%> (ø) |
|
pints/_boundaries.py | 100.00% <0.00%> (ø) |
|
pints/_evaluation.py | 100.00% <0.00%> (ø) |
|
... and 77 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a6a1a39...17feb6e. Read the comment docs.
Cool. Not sure about this one currently, to be honest. Let me think about it...
On Wed, Oct 9, 2019 at 12:17 AM Michael Clerx [email protected] wrote:
@MichaelClerx commented on this pull request.
In pints/_mcmc/_mala.py https://github.com/pints-team/pints/pull/994#discussion_r332773584:
if not self._ready_for_tell:
if self._proposed is None: raise RuntimeError('Tell called before proposal was set.')
self._ready_for_tell = False
It's more in line with what we have in the other MCMC methods, with the exception of the ones that do more complicated stuff in ask() than just set a proposal.
So no very strong reason! Just that it's possible to let users ask() as often as they like in this case (and always get the same result), and it lets us remove a variable...
We might want to disallow this everywhere instead though? In which case we'd have to update the documentation for SingleChainMCMC and MultiChainMCMC a bit to make this explicit...
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/pints-team/pints/pull/994?email_source=notifications&email_token=ABCILKGLYVAHP6GNXOQGGDLQNUIKBA5CNFSM4I6XHKBKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCHJ6VDY#discussion_r332773584, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCILKFFBVMNY46K47IUA3DQNUIKBANCNFSM4I6XHKBA .
Made a ticket here #996
Can we re-open discussion on this, @ben18785 and @martinjrobins ? See especially https://github.com/pints-team/pints/issues/996
No thoughts on this? It needs to be resolve one of two ways, I think:
- Make it so that you can only ask once, in every method: a second call to ask() breaks everything
- Make it so that you can ask as often as you like, in every method.