Skip to content

Commit 428fc93

Browse files
fixup for failing conditional sampling tests (#1289)
* fixup for failing conditional sampling tests * Update CHANGELOG.md * fix LC2ST tests * more bugfixes
1 parent 138c5dc commit 428fc93

File tree

4 files changed

+24
-21
lines changed

4 files changed

+24
-21
lines changed

CHANGELOG.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,31 @@
22

33
## Bug Fixes
44

5-
- fixup for failing hmc test by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1247
6-
- fix: make RestrictedPrior a distribution to enable log_prob @janfb in https://github.com/sbi-dev/sbi/pull/1257
7-
- fix: npe iid handling by @janfb in https://github.com/sbi-dev/sbi/pull/1262
8-
- fix: tutorials test error handling, fix bugs in tutorials by @janfb in https://github.com/sbi-dev/sbi/pull/1264
9-
- fix #1260: include points in plotting limits by @janfb in https://github.com/sbi-dev/sbi/pull/1265
10-
- fix: conditioned potential error handling by @janfb in https://github.com/sbi-dev/sbi/pull/1275
5+
- fixup for failing hmc test by @michaeldeistler (#1247)
6+
- fix: make RestrictedPrior a distribution to enable log_prob @janfb (#1257)
7+
- fix: npe iid handling by @janfb (#1262)
8+
- fix: tutorials test error handling, fix bugs in tutorials by @janfb (#1264)
9+
- fix #1260: include points in plotting limits by @janfb (#1265)
10+
- fix: conditioned potential error handling by @janfb, @michaeldeistler (#1275, #1289)
11+
- fix: Allow 1D pytorch distributions by @michaeldeistler (#1286)
1112

1213
## Documentation
1314

14-
- Rename SNPE to NPE in the README by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1248
15-
- update pickling FAQ by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1255
16-
- Adding example for custom DataLoader to tutorial 18 by @psteinb in https://github.com/sbi-dev/sbi/pull/1256
17-
- docs: add readme intro to docs landing page by @janfb in https://github.com/sbi-dev/sbi/pull/1272
15+
- Rename SNPE to NPE in the README by @michaeldeistler (#1248)
16+
- update pickling FAQ by @michaeldeistler (#1255)
17+
- Adding example for custom DataLoader to tutorial 18 by @psteinb (#1256)
18+
- docs: add readme intro to docs landing page by @janfb (#1272)
19+
- Change sampling method for LC2ST to `sample_batched()` by @JuliaLinhart (#1279)
1820

1921
## Maintenance
2022

21-
- Refactor simulate_for_sbi location by @samadpls in https://github.com/sbi-dev/sbi/pull/1253
22-
- build: devcontainer update by @janfb in https://github.com/sbi-dev/sbi/pull/1252
23-
- fix: docker notebook python version by @janfb in https://github.com/sbi-dev/sbi/pull/1258
24-
- refactor: remove outputs except plots from tutorials. by @janfb in https://github.com/sbi-dev/sbi/pull/1266
25-
- build: automatic nb stripping and pypi upload by @janfb in https://github.com/sbi-dev/sbi/pull/1267
26-
- refactor: remove deprecated x_shape where not needed. by @janfb in https://github.com/sbi-dev/sbi/pull/1271
23+
- Refactor simulate_for_sbi location by @samadpls (#1253)
24+
- build: devcontainer update by @janfb (#1252)
25+
- fix: docker notebook python version by @janfb (#1258)
26+
- refactor: remove outputs except plots from tutorials. by @janfb (#1266)
27+
- build: automatic nb stripping and pypi upload by @janfb (#1267)
28+
- refactor: remove deprecated x_shape where not needed by @janfb (#1271)
29+
- more explicit error message for CNN shapes by @Ankush7890 (#1281)
2730

2831
# v0.23.1
2932

tests/lc2st_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def test_lc2st_false_positiv_rate(method):
197197

198198
# use big num_train and num_epochs to obtain "good" estimator
199199
# (convergence of the estimator)
200-
num_train = 1_000
200+
num_train = 5_000
201201
num_epochs = 200
202202

203203
num_cal = 1_000

tests/linearGaussian_fmpe_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ def simulator(theta):
287287
# Evaluate the conditional density be drawing samples and smoothing with a Gaussian
288288
# kde.
289289
potential_fn, theta_transform = posterior_estimator_based_potential(
290-
posterior_estimator, prior=prior
291-
).set_x(x_o, x_is_iid=False)
290+
posterior_estimator, prior=prior, x_o=x_o
291+
)
292292
(
293293
conditioned_potential_fn,
294294
restricted_tf,

tests/linearGaussian_snpe_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,8 @@ def simulator(theta):
558558
# Evaluate the conditional density be drawing samples and smoothing with a Gaussian
559559
# kde.
560560
potential_fn, theta_transform = posterior_estimator_based_potential(
561-
posterior_estimator, prior=prior
562-
).set_x(x_o, x_is_iid=False)
561+
posterior_estimator, prior=prior, x_o=x_o
562+
)
563563
(
564564
conditioned_potential_fn,
565565
restricted_tf,

0 commit comments

Comments
 (0)