Sbi

Latest version: v0.24.0

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

0.24.0

✨ Highlights

- feat: add `CategoricalMADE` by jnsbck in https://github.com/sbi-dev/sbi/pull/1269 **(Major New Feature)**
- tests: `mini-sbibm` by manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1335 **(Major New Feature)**
- feat: Score-based iid sampling by manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1381 **(Major New Feature)**
- Drop python3.9 support, fix ci by janfb in https://github.com/sbi-dev/sbi/pull/1412 **(Python Version Support Change)**
- additional features for NPSE by gmoss13 in https://github.com/sbi-dev/sbi/pull/1370 **(Enhancement)**

🐛 Bug Fixes

- 1350 leakage correction breaks consistency of log prob vs log prob batched by manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1355
- fix 1343 device handling in mog_log_prob by janfb in https://github.com/sbi-dev/sbi/pull/1356
- Fix failing tutorials, change MNLE default for log_transform to False by janfb in https://github.com/sbi-dev/sbi/pull/1367
- Fix conditional posterior shape and device bugs. by janfb in https://github.com/sbi-dev/sbi/pull/1373
- fix: type fix in VI subclasses. xfail pymc tests. by janfb in https://github.com/sbi-dev/sbi/pull/1390
- Temporary Wrappers to fix MADE by gmoss13 in https://github.com/sbi-dev/sbi/pull/1398
- Fix mnle tests, MCMC init pbar, sir batch size. by janfb in https://github.com/sbi-dev/sbi/pull/1410
- fix mnle tests by janfb in https://github.com/sbi-dev/sbi/pull/1415
- fix: protocol and refactor for custom potential by janfb in https://github.com/sbi-dev/sbi/pull/1409
- fix docs workflow by janfb in https://github.com/sbi-dev/sbi/pull/1419
- fix: gpu-handling for CategoricalMADE by janfb in https://github.com/sbi-dev/sbi/pull/1448

🛠️ Maintenance & Improvements

- increase tutorial test timeout by janfb in https://github.com/sbi-dev/sbi/pull/1360
- add nan check to _loss method. by janfb in https://github.com/sbi-dev/sbi/pull/1361
- Update and pin pre commit and ruff to recent version. by janfb in https://github.com/sbi-dev/sbi/pull/1358
- add nan handling in diagnostics by janfb in https://github.com/sbi-dev/sbi/pull/1359
- Improve tests to detect circular imports and resolve all of them by manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1357
- docs: add details about zuko density estimators by janfb in https://github.com/sbi-dev/sbi/pull/1387
- fix: duplication of 'large number' in warning by turnmanh in https://github.com/sbi-dev/sbi/pull/1391
- improve PR and issue templates by janfb in https://github.com/sbi-dev/sbi/pull/1399
- perf: speed up CI with uv by janfb in https://github.com/sbi-dev/sbi/pull/1400
- tests: add pytest testmon plugin to speed up CI by janfb in https://github.com/sbi-dev/sbi/pull/1402
- small fixes to score methods by janfb in https://github.com/sbi-dev/sbi/pull/1404
- docs: Corrected python version in installation document (Revised) by VijaySamant4368 in https://github.com/sbi-dev/sbi/pull/1423
- docs: Markdown formatting compliant to Markdown Linter (solves 1434) by nMaax in https://github.com/sbi-dev/sbi/pull/1443

🎉 New Contributors

- VijaySamant4368 made their first contribution in https://github.com/sbi-dev/sbi/pull/1423
- nMaax made their first contribution in https://github.com/sbi-dev/sbi/pull/1443

**Full Changelog**: https://github.com/sbi-dev/sbi/compare/v0.23.3...v0.24.0

0.23.3

Highlights 🤩

- docs: Add conda-forge install instructions by matthewfeickert in <https://github.com/sbi-dev/sbi/pull/1340>
- feat: `NLE` with multiple iid conditions by janfb in <https://github.com/sbi-dev/sbi/pull/1331>

What's Changed 🚧

- fix: Correted typo in y-axis label by turnmanh in <https://github.com/sbi-dev/sbi/pull/1296>
- docs: update embedding networks notebook by emmanuel-ferdman in <https://github.com/sbi-dev/sbi/pull/1297>
- fix pickle issues in MCMC posterior + test by manuelgloeckler in <https://github.com/sbi-dev/sbi/pull/1291>
- Minor fix for EnsemblePosterior weights.setter by CompiledAtBirth in <https://github.com/sbi-dev/sbi/pull/1299>
- Remove deprecated neural_net access from `utils` by tvwenger in <https://github.com/sbi-dev/sbi/pull/1302>
- [test] add tests for ensemble posterior weights by samadpls in <https://github.com/sbi-dev/sbi/pull/1307>
- Clarify last round behavior of SNPE-A by michaeldeistler in <https://github.com/sbi-dev/sbi/pull/1323>
- expose batched sampling option; error handling by janfb in <https://github.com/sbi-dev/sbi/pull/1321>
- Fix 1316: remove sample_dim docstring for condition. by janfb in <https://github.com/sbi-dev/sbi/pull/1338>
- docs: fix tutorial typos by janfb in <https://github.com/sbi-dev/sbi/pull/1341>
- docs: run and seed SBC tutorial by manuel-morales-a in <https://github.com/sbi-dev/sbi/pull/1336>

New Contributors 🎉

- emmanuel-ferdman made their first contribution in <https://github.com/sbi-dev/sbi/pull/1297>
- CompiledAtBirth made their first contribution in <https://github.com/sbi-dev/sbi/pull/1299>
- tvwenger made their first contribution in <https://github.com/sbi-dev/sbi/pull/1302>
- matthewfeickert made their first contribution in <https://github.com/sbi-dev/sbi/pull/1340>
- manuel-morales-a made their first contribution in <https://github.com/sbi-dev/sbi/pull/1336>

**Full Changelog**: <https://github.com/sbi-dev/sbi/compare/v0.23.2...v0.23.3>

0.23.2

Bug Fixes

- fixup for failing hmc test by michaeldeistler (1247)
- fix: make RestrictedPrior a distribution to enable log_prob janfb (1257)
- fix: npe iid handling by janfb (1262)
- fix: tutorials test error handling, fix bugs in tutorials by janfb (1264)
- fix 1260: include points in plotting limits by janfb (1265)
- fix: conditioned potential error handling by janfb, michaeldeistler (1275, 1289)
- fix: Allow 1D pytorch distributions by michaeldeistler (1286)

Documentation

- Rename SNPE to NPE in the README by michaeldeistler (1248)
- update pickling FAQ by michaeldeistler (1255)
- Adding example for custom DataLoader to tutorial 18 by psteinb (1256)
- docs: add readme intro to docs landing page by janfb (1272)
- Change sampling method for LC2ST to `sample_batched()` by JuliaLinhart (1279)

Maintenance

- Refactor simulate_for_sbi location by samadpls (1253)
- build: devcontainer update by janfb (1252)
- fix: docker notebook python version by janfb (1258)
- refactor: remove outputs except plots from tutorials. by janfb (1266)
- build: automatic nb stripping and pypi upload by janfb (1267)
- refactor: remove deprecated x_shape where not needed by janfb (1271)
- more explicit error message for CNN shapes by Ankush7890 (1281)

0.23.1

- fix: include `score` folder by adding `__init__.py` (1245 1246)

0.23.0

Announcements

- Re-licensing: license change from
[AGPLv3](https://www.gnu.org/licenses/agpl-3.0.en.html) to
[Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) (see #997 for
details)
- `sbi` is now affiliated with [`NumFOCUS`](https://numfocus.org) 🎉
- New contributors 🎉: anastasiakrouglova, theogruner, felixp8, Matthijspals,
jsvetter, pfuhr, turnmanh, fariedabuzaid, augustes, zinastef, Baschdl,
danielmk, lisahaxel, janko-petkovic, samadpls, ThomasGesseyJonesPX, schroedk

Major Changes

- internal renaming of all inference classes from, e.g., `SNPE` to `NPE` (i.e., we
removed the `S` prefix). The functionality of the classes remains the same. The NPE
class handles both the amortized and sequential versions of neural posterior
estimation. An alias for SNPE (and other sequential methods) still exists for
backwards compatibility (1238) (michaeldeistler).
- change `sbi` default parameters: `training_batch_size=200`, `num_chains=20` (1221)
(janfb)
- change imports of `posterior_nn`, `likelihood_nn`, and `classifier_nn`. They should
now be imported from `sbi.neural_nets`, not from `sbi.utils` (994) (famura)
- big refactoring of plotting utilities, new tutorial (1084) (Matthijspals)
- improved tutorials and website documentation (1012, 1051, 1073) (augustes,
zinaStef, lisahaxel, psteinb)
- improved website structure and contribution guides (1019) (tomMoral, janfb)
- drop support for python3.8 and torch1.12 (1233)
- refactor folder structure and naming of `neural_nets` (1237) (michaeldeistler)

New Features

- full flexibility over the training loop (983) (michaeldeistler)
- unified density estimator classes (952, 965, 979, 1151) (michaeldeistler,
gmoss13, tomMoral, manualgloeckler)
- vectorized sampling and log_prob for `(S)NPE` given batches of x (1153)
(manuelgloeckler, michaeldeistler)
- batched sampling for vectorized MCMC samplers (1176, 1210) (gmoss13, janfb)
- support zuko as a backend for normalizing flows (1088, 1116)
(anastasiakrouglova)
- local c2st metric (1109) (JuliaLinhart)
- tarp coverage metric (1106) (psteinb)
- add interface for PyMC samplers (1053) (famura, felixp8)
- flow matching density estimators (1049) (turnmanh, fariedabuzaid, janfb)
- score matching density estimators (1015) (rdgao, jsvetter, pfuhr,
manuelgloeckler, michaeldeistler, janfb)
- ABC methods for trial-based data using statistical distances (1104)
(theogruner)
- support Apple MPS as gpu device (912) (janfb)
- dev container for using `sbi` in codespaces on GitHub (1070) (turnmanh)
- enable importance sampling for likelihood-based estimators (1183) (manuelgloeckler)
- refactoring and unified shape handling for `RatioEstimator` (1097) (bkmi)
- faster sbc and tarp calibration checks via batched sampling (1196) (janfb)
- batched sampling and embedding net support for `MNLE` (1203) (janfb)
- adapt `MNLE` to new densitye stimator abstraction (1089) (coschroeder)
- better plotting options for coverage plots (1039, 1212) (janfb)
- allow for potential_fn to be a Callable (943) (michaeldeistler)

Bug Fixes

- bugfix for embedding net tutorial (1159) (deismic)
- Fixup for process_x in EnsemblePosterior (1148) (deismic)
- fixed notebook by changing MCMC parameters (1058) (zinaStef)
- fix: add NeuralPosteriorEnsemble to utils.__init__ (1002) (jnsbck)
- fix: print_false_positive_rate (976) (danielmk)
- fix: make VIPosterior pickable (951) (manuelgloeckler)
- fix: bug in importance sampled posterior (1081) (max-dax)
- fix: embedding device and warning handling (1186) (janfb)
- fix: c2st with constant features (1204) (janfb)
- fix: erroneous warnings about different devices (1225, ThomasGesseyJonesPX)
- fix: type annotation in class `ConditionedPotential` (1222) (schroedk)

Maintenance and other changes

- add pre-commit hooks (955) (janfb)
- add ruff to replace `isort`, `black`, `flake` (960, 978, 1113) (janfb)
- switch to `pyproject.toml` for package specification (941) (janfb)
- Split the GitHub workflow in CI and CD (1063) (famura)
- split linting process from the CI/CD workflow (1164) (tomMoral)
- Switch to the newest `pyright` and fix all typing errors (1045, 1108) (Baschdl)
- introduce two docs versions: `latest` pointing to latest release at
<https://sbi-dev.github.io/sbi/latest/> and `dev` pointing to the latest version on
`main` <https://sbi-dev.github.io/sbi/dev/>

0.22.0

API change

- We have moved `sbi` to an new github organization: `https://github.com/sbi-dev/sbi`
- We have changed the website of the `sbi` docs: `https://sbi-dev.github.io/sbi/`.
- `sbi.analysis.pairplot`: `upper` was replaced by `offdiag` and will be deprecated in a future release.

Features and enhancements

- size-invariant embedding nets for amortized inference with iid-data (janfb, 808)
- option for new using MAF with rational quadratic splines (thanks to ImahnShekhzadeh, 819)
- improved docstring for `process_prior` (thanks to musoke, 813)
- extended tutorial for SBI with iid data (janfb, 857)
- new tutorial for SBI with experimental conditions and mixed data (janfb, 829)
- New options for `pairplot`:
- `upper` is now called `offdiag` to match other kwargs.
- alternating colors for `samples` and `points`
- option to add a `legend` and pass `kwargs` for the legend.

Bug fixes

- fixed memory leak in in `append_simulations` (thanks to VictorSven, 803)
- bug fix for CNRE (thanks to bkmi, 815)
- bug fix for iid-inference with posterior ensembles (janfb, 826)
- bug fix for simulation-based calibration with VI posteriors (janfb, 834, 838)
- bug fix for BoxUniform device handling (janfb, 854, 856)
- bug fix for MAP estimates with independent priors (janfb, 867)
- bug fix for tutorial on SBC (michaeldeistler, 891)
- fix spurious seeding for `simulate_for_sbi` (jan-matthis, 876)
- bump python version of github action tests to `3.9.13` (michaeldeistler, 888, 900)

Page 1 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.