-
Notifications
You must be signed in to change notification settings - Fork 152
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
run_sbc (and run_tarp) run time #1329
Comments
Hi @humnaawan thanks for reporting this! Some context that might help already:
To summarize:
Note that Does this help? |
hi @janfb, thanks so much! I am indeed working with a direct posterior (sorry for not including the detail in my first post) via:
thank you for reminding me about It is helpful to know that |
I see, thanks for the details. So you effectively evaluation the underlying density estimator with a batch-size of 1000 thetas (posterior samples) and 1000 xs (sbc samples), which could be the bottleneck here. What I would try:
|
Thank you! I am currently not using an embedding network as I wanted to see how things work out of the box; it's certainly on my todo list. I will try your two suggestions and hopefully the function call finishes. I appreciate your quick feedback! |
I would recommend using at least a small embedding net, e.g., the standard MLP we have implemented here: and explained here: Otherwise it could be challenging for the flow-based density estimator to cope with the 500-D conditioning dimension. I am moving this issue to discussions and close it here. Feel free to give updates of your case there. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hello, is there any documentation on how to effectively use
num_workers
anduse_batched_sampling
? I am running into very long run times withrun_sbc
and I am not sure whats going wrong. Here's how I'm calling the function:I have 1000 simulations and I set
nsamples
to be 1000. When I toggle the above betweenuse_batched_sampling=False
anduse_batched_sampling=True
(default) in the function call, the former at least gives me a progress update although it still doesn't finish.Looking through the code, I think the bottleneck might be
max_sampling_batch_size
which is set to 10,000? The parameter is not exposed though (at least when you build a posterior viainference.build_posterior
). I did setsimulation_batch_size
insimulate_for_sbi
(to beint(nsims/ncpus)
) but I dont think that gets communicated to theDirectPosterior
object.I run into the same issue with
run_tarp
which doesnt have theuse_batched_sampling
exposed (although #1321 should enable that once its merged).I use
cpus-per-task=35
in mysbatch
script and confirm that 35 cpus are indeed available. Therun_sbc
call seems to be stuck at 1/1000 even after 5hours when using the default option foruse_batched_sampling
, and barely passes 100/1000 after 12hrs (even though the time estimates on the progress bar estimate otherwise) when I setuse_batched_sampling=False
.I'd really appreciate some help. I am starting to unpack
run_sbc
since I can't think of anything else but thought I'd inquire here in case I'm missing something. My understanding is that my call never makes it pastget_posterior_samples_on_batch
(which callsposterior.sample_batched
).Thank you!
The text was updated successfully, but these errors were encountered: