-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: batched sampling and log prob methods. (#1153)
* Base estimator class * intermediate commit * make autoreload work * `amortized_sample` works for MCMCPosterior * fixes current bug! * Added tests * batched_rejection_sampling * intermediate commit * make autoreload work * `amortized_sample` works for MCMCPosterior * Revert "Merge branch '990-add-sample_batched-and-log_prob_batched-to-posteriors' into amortizedsample" This reverts commit 07084e2, reversing changes made to f16622d. * sample works, try log_prob_batched * log_prob_batched works * abstract method implement for other methods * temp fix mcmcposterior * meh for general use i.e. in the restriction prior we have to add some reshapes in rejection * ... test class * Revert "Base estimator class" This reverts commit 17c5343. * removing previous change * removing some artifacts * revert wierd change * docs and tests * MCMC sample_batched works but not log_prob batched * adding some docs * batch_log_prob for MCMC requires at best changes for potential -> removed * intermediate commit * make autoreload work * `amortized_sample` works for MCMCPosterior * intermediate commit * make autoreload work * `amortized_sample` works for MCMCPosterior * Base estimator class * Revert "Merge branch '990-add-sample_batched-and-log_prob_batched-to-posteriors' into amortizedsample" This reverts commit 07084e2, reversing changes made to f16622d. * fixes current bug! * Added tests * batched_rejection_sampling * sample works, try log_prob_batched * log_prob_batched works * abstract method implement for other methods * temp fix mcmcposterior * meh for general use i.e. in the restriction prior we have to add some reshapes in rejection * ... test class * Revert "Base estimator class" This reverts commit 17c5343. * removing previous change * removing some artifacts * revert wierd change * docs and tests * MCMC sample_batched works but not log_prob batched * adding some docs * batch_log_prob for MCMC requires at best changes for potential -> removed * Fixing bug from rebase... * tracking all acceptance rates * Comment on NFlows * Also testing SNRE batched sampling, Need to test ensemble implementation * fig bug * Ensemble sample_batched is working (with tests) * GPU compatibility * restriction priopr requires float as output of accept_reject * Adding a few comments * 2d sample_shape tests * Apply suggestions from code review Co-authored-by: Jan <[email protected]> * Adding comment about squeeze * Update sbi/inference/posteriors/direct_posterior.py Co-authored-by: Jan <[email protected]> * fixing formating * reverting MCM posterior changes * xfail mcmc tests * Exclude MCMC from ensamble batched_sample test * SNPE_A Bug fix * typo fix * preamtive main fix * Revert "preamtive main fix" This reverts commit 2aac705. --------- Co-authored-by: manuelgloeckler <[email protected]> Co-authored-by: Jan Boelts <[email protected]> Co-authored-by: manuelgloeckler <[email protected]> Co-authored-by: Jan <[email protected]>
- Loading branch information
1 parent
a7e65c5
commit 4951439
Showing
14 changed files
with
406 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.