Non-blocking sampling
Description
Nutpie allow sampling in a non-blocking thread, which is great for interactive workflows. You can start playing with plotting - summary code while the model is sampling. We should try to enable that for PyMC samplers as well, running it in a distinct thread from main?
CC @lucianopaz @aseyboldt
I would like to solve this
I don’t see a PR for this yet. I’m going to take a crack at it and open a draft soon. First pass will add an opt-in background sampling option for NUTS (threaded), return a handle to check completion/get the result, keep progress bars quiet, and include a couple of small tests + docs. Happy to adjust if you prefer a different API or scope.
Hi! I’ve opened this PR to add an opt-in background sampling handle to pm.sample. Pre-commit and docs have passed. Please approve the pending workflows (all_tests, mypy) so they can run, and review and tell if any changes when you have a moment. Thanks!