FEAT: Improve interactions of user pools - #1009
Conversation
mj-will
left a comment
There was a problem hiding this comment.
Looks great, I look forward to trying it! I've added some initial comments but might need to have a second look.
ColmTalbot
left a comment
There was a problem hiding this comment.
I don't remember exactly what the behaviour for some of these questions is, so I'll go back and check, and ideally write docstrings about them.
mj-will
left a comment
There was a problem hiding this comment.
Forgot to submit my comments as a review, but see them above.
adivijaykumar
left a comment
There was a problem hiding this comment.
Can we add a test for schwimmbad/MPI support?
|
We should documentation for user pools and note that the pool will only work correctly in the initializer has been called. |
mj-will
left a comment
There was a problem hiding this comment.
Coming back to this again, I think the only pending item is documentation for the new pool support.
I haven't added an MPI test, but we have a schwimmbad test using the SerialPool, which should have the same API. |
FEAT: improve reweighting parallelisation FEAT: add parameters as argument to new pool BUG: test that pool exists at cleanup BUG: test pool exists at closing REFACTOR: refactor run_sampler to simplify pool logic DEP: discourage setting up pool in sampler REFACTOR: remove top level multiprocessing import BUG: make sure prior is passed to pool creation BUG: fix test failures TEST: fix reproducibility test BUG: fix a typo in conversion function test MAINT: don't create pool of size 1 BUG: only include chunksize in multiprocessing map DOC: add docstrings for pool functions DOC: update pool docstrings Address review comments TYPO: Fix typo in parameter description comments BUG: move definition of chunk size in reweighting MAINT: remove old function Fix wrong function name in docstring REFACTOR: refactor pool initialization and add documentation FMT: precommit fixes TST: fix failing tests
97c094f to
d9fe332
Compare
I noticed that it was difficult to pass a user-specified pool through run_sampler, and it isn't used at all in the post processing. This PR:
with multiprocessing.pool()...)Sampler._setup_poolandSampler._close_poolparallel_bilbymoot.