Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dwelltime: allow parallel bootstraps #736

Merged
merged 1 commit into from
Mar 20, 2025
Merged

Conversation

JoepVanlier
Copy link
Member

@JoepVanlier JoepVanlier commented Mar 17, 2025

Why this PR?
Bootstrapping can become prohibitively expensive for large number of samples. This adds a small API which can be used to speed things up. Considering we may want >= 2 components in models we end up ranking this is low hanging fruit for speeding things up.

@JoepVanlier JoepVanlier force-pushed the joep/parallel_dwell branch 16 times, most recently from 38a2a87 to 4a75292 Compare March 19, 2025 10:53
@JoepVanlier JoepVanlier force-pushed the joep/parallel_dwell branch from 4a75292 to ec291d0 Compare March 19, 2025 11:42
@JoepVanlier JoepVanlier marked this pull request as ready for review March 19, 2025 15:37
@JoepVanlier JoepVanlier requested a review from a team as a code owner March 19, 2025 15:37
Copy link

@alessiamarcolini alessiamarcolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -158,6 +158,24 @@ def test_bootstrap_multi(min_obs, max_obs, ref_ci, time_step):
np.testing.assert_allclose(ci, ref_ci, rtol=1e-5)


@pytest.mark.parametrize("num_components", [1, 2])
def test_bootstrap_parallel(monkeypatch, exponential_data, num_components):
import multiprocessing.dummy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL

@JoepVanlier JoepVanlier merged commit 4abeae0 into main Mar 20, 2025
8 checks passed
@JoepVanlier JoepVanlier deleted the joep/parallel_dwell branch March 20, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants