Skip to content

run_sbc (and run_tarp) run time #1332

Answered by janfb
humnaawan asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @humnaawan

thanks for reporting this! Some context that might help already:

  • batched sampling is quite fast for "direct" posteriors like NPE because it's just a forward pass in the flow and it can just pass the entire batch of xs.
  • for MCMCPosteriors is in principle much slower because we have to run MCMC for each x in xs separately. For the slice_np_vectorize MCMC method we implemented batched sampling, but it's still slower because it has to run MCMC and evaluate the flow for each element in the chain.
  • when you use batched sampling, it's one single call to be sample method with a big batch of xs, so we cannot parallelize it. Thus, num_workers only has an effect if batch_sampling=False.

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by janfb
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #1329 on December 13, 2024 08:28.