- Notifications
You must be signed in to change notification settings - Fork194
fix: add NeuralPosteriorEnsemble to utils.__init__#1002
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
gmoss13 merged 43 commits intomainfrom744-allow-import-of-neuralposteriorensemble-from-sbiutilsMar 19, 2024
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
43 commits Select commitHold shift + click to select a range
ed1c618
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbck0cfe434
fix: ran black
jnsbckdbd93a8
fix: fixes circular deps at potential expense of isort
jnsbck331f341
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbck4ceb513
fix: ran black
jnsbcke6c62a0
fix: fixes circular deps at potential expense of isort
jnsbck5b54f7c
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbckc47f284
fix: ran black
jnsbck0df4292
fix: fixes circular deps at potential expense of isort
jnsbck82bab2c
mv: move ensemble posterior to posteriors. fixes ImportError. Add dep…
jnsbckc51d2a0
fix: incl EnsemblePosterior in inference.__init__
jnsbck422bef1
fix: rename NeuralPosteriorEnsemble in tests.
jnsbckacdb4ec
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbck0c6d825
fix: ran black
jnsbck033231d
fix: fixes circular deps at potential expense of isort
jnsbckd478057
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbckf4178f5
fix: ran black
jnsbckc0ad5ba
fix: fixes circular deps at potential expense of isort
jnsbckc324c55
mv: move ensemble posterior to posteriors. fixes ImportError. Add dep…
jnsbck92c9da1
fix: ran pre-commit hooks
jnsbck2748034
add: add tests for import b4 deprecation
jnsbck4415faa
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbckd252fd5
fix: ran black
jnsbcke398f92
fix: fixes circular deps at potential expense of isort
jnsbck775ebc3
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbckb221fef
fix: ran black
jnsbck989be10
fix: fixes circular deps at potential expense of isort
jnsbckbae30b0
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbck7b26bd1
fix: ran black
jnsbckdcb2fee
fix: fixes circular deps at potential expense of isort
jnsbck074e866
mv: move ensemble posterior to posteriors. fixes ImportError. Add dep…
jnsbck3099701
fix: incl EnsemblePosterior in inference.__init__
jnsbcka5f1375
fix: rename NeuralPosteriorEnsemble in tests.
jnsbck2402cbf
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbckc0e1c60
fix: ran black
jnsbck4c77a53
fix: fixes circular deps at potential expense of isort
jnsbck28bf84b
fix: add NeuralPosteriorEnsemble to utils.__init__
jnsbckfa1587d
fix: ran black
jnsbck427ead2
fix: fixes circular deps at potential expense of isort
jnsbck4a0494d
mv: move ensemble posterior to posteriors. fixes ImportError. Add dep…
jnsbck2881fa3
fix: ran pre-commit hooks
jnsbck93fa5fa
add: add tests for import b4 deprecation
jnsbck5393c85
Merge branch '744-allow-import-of-neuralposteriorensemble-from-sbiuti…
jnsbckFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
fix: ran black
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitf4178f54f805d550b0e0cbb69e51ae6bc2b287cd
There are no files selected for viewing
97 changes: 66 additions & 31 deletionssbi/utils/__init__.py
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,36 +5,71 @@ | ||
from sbi.utils.io import get_data_root, get_log_root, get_project_root | ||
from sbi.utils.kde import KDEWrapper, get_kde | ||
from sbi.utils.posterior_ensemble import NeuralPosteriorEnsemble | ||
jnsbck marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
from sbi.utils.potentialutils import pyro_potential_wrapper, transformed_potential | ||
from sbi.utils.restriction_estimator import ( | ||
RestrictedPrior, | ||
RestrictionEstimator, | ||
get_density_thresholder, | ||
) | ||
from sbi.utils.sbiutils import ( | ||
batched_mixture_mv, | ||
batched_mixture_vmv, | ||
check_dist_class, | ||
check_warn_and_setstate, | ||
clamp_and_warn, | ||
del_entries, | ||
expit, | ||
get_simulations_since_round, | ||
gradient_ascent, | ||
handle_invalid_x, | ||
logit, | ||
mask_sims_from_prior, | ||
match_theta_and_x_batch_shapes, | ||
mcmc_transform, | ||
mog_log_prob, | ||
nle_nre_apt_msg_on_invalid_x, | ||
npe_msg_on_invalid_x, | ||
standardizing_net, | ||
standardizing_transform, | ||
warn_if_zscoring_changes_data, | ||
within_support, | ||
x_shape_from_simulation, | ||
z_score_parser, | ||
) | ||
from sbi.utils.torchutils import ( | ||
BoxUniform, | ||
assert_all_finite, | ||
cbrt, | ||
create_alternating_binary_mask, | ||
create_mid_split_binary_mask, | ||
create_random_binary_mask, | ||
gaussian_kde_log_eval, | ||
get_num_parameters, | ||
get_temperature, | ||
logabsdet, | ||
merge_leading_dims, | ||
random_orthogonal, | ||
repeat_rows, | ||
searchsorted, | ||
split_leading_dim, | ||
sum_except_batch, | ||
tensor2numpy, | ||
tile, | ||
) | ||
from sbi.utils.typechecks import ( | ||
is_bool, | ||
is_int, | ||
is_nonnegative_int, | ||
is_positive_int, | ||
is_power_of_two, | ||
) | ||
from sbi.utils.user_input_checks import ( | ||
check_estimator_arg, | ||
check_prior, | ||
process_prior, | ||
process_x, | ||
test_posterior_net_for_multi_d_x, | ||
validate_theta_and_x, | ||
) | ||
from sbi.utils.user_input_checks_utils import MultipleIndependent | ||
from sbi.utils.posterior_ensemble import NeuralPosteriorEnsemble |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.