Skip to content

Commit 4cbd7fc

Browse files
authored
docs: prepare release 0.25 (#1643)
* add changelog, bump version * improve headings * update docs building instructions. * update installation instructions. * update contribution guide installation instructions. * add warning and new link to old docs. * skip fnpe score estimation iid test * fix links in readme.
1 parent e6f42a0 commit 4cbd7fc

File tree

9 files changed

+262
-63
lines changed

9 files changed

+262
-63
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
name: python-package-distributions
7272
path: dist/
7373
- name: Sign the dists with Sigstore
74-
uses: sigstore/gh-action-sigstore-python@v2.1.1
74+
uses: sigstore/gh-action-sigstore-python@v3.0.0
7575
with:
7676
inputs: >-
7777
./dist/*.tar.gz

CHANGELOG.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,169 @@
11
# Changelog
22

3+
# Changelog
4+
5+
## v0.25.0
6+
7+
### ✨ Highlights
8+
9+
#### 🚀 New Inference Methods
10+
11+
* **MNPE class similar to MNLE** by @dgedon in https://github.com/sbi-dev/sbi/pull/1362
12+
* **Implementing SNPE-B (#199)** by @etouron1 in https://github.com/sbi-dev/sbi/pull/1471
13+
14+
#### 🧠 Neural Network Architectures & Embedding Networks
15+
16+
* **Simple transformer implementation** by @NicolasRR in https://github.com/sbi-dev/sbi/pull/1494
17+
* **Add embedding net that uses 1D causal convolutions (#1459)** by @Aranka-S in https://github.com/sbi-dev/sbi/pull/1499
18+
* **Add LRU-backed embedding networks** by @famura in https://github.com/sbi-dev/sbi/pull/1512
19+
* **Add ResNet as embedding model** by @StefanWahl in https://github.com/sbi-dev/sbi/pull/1472
20+
* **Spectral convolution embedding net** by @L-in-da in https://github.com/sbi-dev/sbi/pull/1503
21+
22+
#### ⭐ Major Features & Capabilities
23+
24+
* **Unify flow matching and score-based models** by @StarostinV in https://github.com/sbi-dev/sbi/pull/1497
25+
* **Model misspecification based on MMD** by @coschroeder in https://github.com/sbi-dev/sbi/pull/1502
26+
* **Marginal estimator log-prob based test for misspecification** by @swag2198 in https://github.com/sbi-dev/sbi/pull/1522
27+
* **Adding interface for unconditional flow training** by @plcrodrigues in https://github.com/sbi-dev/sbi/pull/1470
28+
* **Support using trained estimators in Pyro models** by @sethaxen in https://github.com/sbi-dev/sbi/pull/1491
29+
* **Add util to generate mcmc samples from user defined potential (#1405)** by @hayden-johnson in https://github.com/sbi-dev/sbi/pull/1483
30+
* **Logit transform** by @anastasiakrouglova in https://github.com/sbi-dev/sbi/pull/1485
31+
32+
#### 📚 Documentation & Tutorials
33+
34+
* **Tutorial on new features for score-based methods #1392** by @touronc in https://github.com/sbi-dev/sbi/pull/1489
35+
* **Docs: Introduce Readthedocs website** by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1463
36+
37+
### 🐛 Bug Fixes
38+
39+
* z_score correct order in Zuko by @anastasiakrouglova in https://github.com/sbi-dev/sbi/pull/1492
40+
* Minor fix when moving thetas from GPU to CPU by @famura in https://github.com/sbi-dev/sbi/pull/1515
41+
* Minor fix while using unconditional density estimator and LRU embedding by @ARna06 in https://github.com/sbi-dev/sbi/pull/1556
42+
* fix: replace 'in' operator with '==' for proper classifier comparison by @abelaba in https://github.com/sbi-dev/sbi/pull/1550
43+
* flowmatching condition shape fix by @gmoss13 in https://github.com/sbi-dev/sbi/pull/1584
44+
* patch for torch bug in tarp, run torch.histogram with cpu-only tensor by @psteinb in https://github.com/sbi-dev/sbi/pull/1596
45+
* fix failing tarp test by @janfb in https://github.com/sbi-dev/sbi/pull/1628
46+
* fix: cap max_sampling_batch_size to prevent excessive memory by @janfb in https://github.com/sbi-dev/sbi/pull/1624
47+
* 1561 computation of denoising posterior precision matrix in jac method score fn iid by @manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1636
48+
* fix xfail test, fix deprecation warnings by @janfb in https://github.com/sbi-dev/sbi/pull/1642
49+
50+
### 🛠️ Maintenance & Improvements
51+
52+
#### 🔧 Code Quality & Refactoring
53+
54+
* Refactoring flow and score matching classes and nets by @manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1544
55+
* Rename inference trainer classes by @abelaba in https://github.com/sbi-dev/sbi/pull/1605
56+
* Rename VectorFieldInference to VectorFieldTrainer by @abelaba in https://github.com/sbi-dev/sbi/pull/1614
57+
* Refactor build_posterior to Eliminate Duplication Across Trainers by @abelaba in https://github.com/sbi-dev/sbi/pull/1610
58+
* Refactor build posterior method arguments to use Literals by @abelaba in https://github.com/sbi-dev/sbi/pull/1606
59+
* Refactor build_posterior Posterior Configuration Using Dataclasses by @abelaba in https://github.com/sbi-dev/sbi/pull/1619
60+
* Use TypeAlias and consistent naming for sbi types by @janfb in https://github.com/sbi-dev/sbi/pull/1637
61+
* Add protocol for estimator builder by @abelaba in https://github.com/sbi-dev/sbi/pull/1633
62+
* Improve abc implementation by @janfb in https://github.com/sbi-dev/sbi/pull/1615
63+
64+
#### 🏷️ Type Hints & API Improvements
65+
66+
* fix: add enum for flow options to fix type hints. by @janfb in https://github.com/sbi-dev/sbi/pull/1562
67+
* fix LC2ST kwarg typing by @janfb in https://github.com/sbi-dev/sbi/pull/1565
68+
* fix: Update RatioEstimator classifier argument to use a Protocol by @abelaba in https://github.com/sbi-dev/sbi/pull/1582
69+
* Update append_simulations return type to Self by @abelaba in https://github.com/sbi-dev/sbi/pull/1622
70+
* Deprecation Warnings for build_posterior stringly typed parameters by @abelaba in https://github.com/sbi-dev/sbi/pull/1627
71+
72+
#### 🧪 Testing & CI/CD
73+
74+
* Testmon by @manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1452
75+
* disable testmon for now by @manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1467
76+
* chore: Use pytest-split plugin in ci workflow by @schroedk in https://github.com/sbi-dev/sbi/pull/1465
77+
* tests: refactor "not slow" tests to be not so slow by @janfb in https://github.com/sbi-dev/sbi/pull/1495
78+
* Test for known pytorch distribution transform issue by @dgedon in https://github.com/sbi-dev/sbi/pull/1504
79+
* xfail scan test on python 3.13 by @manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1533
80+
* Gpu test for VectorFieldPosterior by @jorobledo in https://github.com/sbi-dev/sbi/pull/1542
81+
* set vector field iid-tests xfail by @janfb in https://github.com/sbi-dev/sbi/pull/1554
82+
* Changed the xfail condition for LRU tests with mode='scan' by @famura in https://github.com/sbi-dev/sbi/pull/1552
83+
* Fix/lru test by @Matthijspals in https://github.com/sbi-dev/sbi/pull/1568
84+
* refactor sbc funcs and tests by @janfb in https://github.com/sbi-dev/sbi/pull/1578
85+
* chore: remove testmon, add codecov test analytics by @janfb in https://github.com/sbi-dev/sbi/pull/1592
86+
* chore: reorder setup steps for Python and uv in CI/CD workflows by @janfb in https://github.com/sbi-dev/sbi/pull/1601
87+
* Fix/lc2st numpy type fixes by @janfb in https://github.com/sbi-dev/sbi/pull/1613
88+
* Fix failing CI on main. by @janfb in https://github.com/sbi-dev/sbi/pull/1618
89+
90+
#### 📖 Documentation & Website
91+
92+
* Fix tests for new docs by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1475
93+
* Prevent notebook execution upon doc build by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1477
94+
* Fix broken links on website by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1480
95+
* fix: Update documentation folder path by @abelaba in https://github.com/sbi-dev/sbi/pull/1510
96+
* fix path to contribute.md by @psteinb in https://github.com/sbi-dev/sbi/pull/1507
97+
* Add utils to docs by @sethaxen in https://github.com/sbi-dev/sbi/pull/1520
98+
* Update new Readthedocs website by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1519
99+
* fix broken links on new website by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1538
100+
* Fixups for new website landing page by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1539
101+
* Fix: add tutorial page to mkdocs website by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1540
102+
* Fix broken links in some tutorials by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1541
103+
* Add examples to documentation by @jorobledo in https://github.com/sbi-dev/sbi/pull/1548
104+
* docs: Add importance_sampling_parameters to build_posterior docstring. by @abelaba in https://github.com/sbi-dev/sbi/pull/1558
105+
* Add missing arguments to LikelihoodEstimator and RatioEstimator docstrings. by @abelaba in https://github.com/sbi-dev/sbi/pull/1571
106+
* Fixups for new RTD website by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1573
107+
* Tutorial with a more representative training loop by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1574
108+
* Fixups for rendering of HH tutorial notebook by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1575
109+
* fix for colors in Hodgkin-Huxley notebook by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1576
110+
* Add citations to how-to guide by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1579
111+
* Clarify fullscreen view of applications-explorer by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1580
112+
* Fixups for the documentation by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1585
113+
* fixed misrendered bullet list, tested locally by @psteinb in https://github.com/sbi-dev/sbi/pull/1594
114+
* Improvements to L-C2ST tutorial by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1588
115+
* docs: Change colortheme in light mode by @michaeldeistler in https://github.com/sbi-dev/sbi/pull/1638
116+
117+
#### 🏗️ Infrastructure & Dependencies
118+
119+
* Add uv support by @abelaba in https://github.com/sbi-dev/sbi/pull/1518
120+
* switch to numfocus code of conduct by @janfb in https://github.com/sbi-dev/sbi/pull/1560
121+
* Update readme with new JOSS citation by @janfb in https://github.com/sbi-dev/sbi/pull/1564
122+
* update numfocus code of conduct by @janfb in https://github.com/sbi-dev/sbi/pull/1602
123+
* Added Apache License reference comments to source files + CI bash script check by @nMaax in https://github.com/sbi-dev/sbi/pull/1599
124+
125+
#### 👥 User Experience & Warnings
126+
127+
* Change xfail to skipif as outcome is not consistent by @gmoss13 in https://github.com/sbi-dev/sbi/pull/1487
128+
* Add warning when using append_simulations with exclude_invalid_x=True by @abelaba in https://github.com/sbi-dev/sbi/pull/1486
129+
* Batch sampling slow without warning by @dgedon in https://github.com/sbi-dev/sbi/pull/1490
130+
* Clarify pbar annotation in sample_batched for DirectPosterior by @StefanWahl in https://github.com/sbi-dev/sbi/pull/1493
131+
132+
#### 🎮 GPU Support & Device Handling
133+
134+
* Prior to(device) by @jorobledo in https://github.com/sbi-dev/sbi/pull/1505
135+
* posterior.to(device) by @jorobledo in https://github.com/sbi-dev/sbi/pull/1527
136+
137+
#### 🔧 Miscellaneous Improvements
138+
139+
* ref: update tests, add types and docs to marginal trainer by @janfb in https://github.com/sbi-dev/sbi/pull/1516
140+
* integrate sbi application eplorer by @lappalainenj in https://github.com/sbi-dev/sbi/pull/1567
141+
* fix: update notebook references by @emmanuel-ferdman in https://github.com/sbi-dev/sbi/pull/1563
142+
* Update sbiutils.py to use one-dimensional batch by @vivienr in https://github.com/sbi-dev/sbi/pull/1577
143+
* fix: remove empty list default argument by @abelaba in https://github.com/sbi-dev/sbi/pull/1608
144+
* fix: throw exception on unsupported activation function by @emmanuel-ferdman in https://github.com/sbi-dev/sbi/pull/1609
145+
* fix: resolve logger warnings by @emmanuel-ferdman in https://github.com/sbi-dev/sbi/pull/1598
146+
* fix paths by @manuelgloeckler in https://github.com/sbi-dev/sbi/pull/1641
147+
148+
### 🎉 New Contributors
149+
150+
* @abelaba made their first contribution in https://github.com/sbi-dev/sbi/pull/1486
151+
* @dgedon made their first contribution in https://github.com/sbi-dev/sbi/pull/1490
152+
* @StefanWahl made their first contribution in https://github.com/sbi-dev/sbi/pull/1493
153+
* @touronc made their first contribution in https://github.com/sbi-dev/sbi/pull/1489
154+
* @jorobledo made their first contribution in https://github.com/sbi-dev/sbi/pull/1505
155+
* @hayden-johnson made their first contribution in https://github.com/sbi-dev/sbi/pull/1483
156+
* @sethaxen made their first contribution in https://github.com/sbi-dev/sbi/pull/1491
157+
* @etouron1 made their first contribution in https://github.com/sbi-dev/sbi/pull/1471
158+
* @Aranka-S made their first contribution in https://github.com/sbi-dev/sbi/pull/1499
159+
* @swag2198 made their first contribution in https://github.com/sbi-dev/sbi/pull/1522
160+
* @StarostinV made their first contribution in https://github.com/sbi-dev/sbi/pull/1497
161+
* @L-in-da made their first contribution in https://github.com/sbi-dev/sbi/pull/1503
162+
* @NicolasRR made their first contribution in https://github.com/sbi-dev/sbi/pull/1494
163+
* @vivienr made their first contribution in https://github.com/sbi-dev/sbi/pull/1577
164+
165+
**Full Changelog**: https://github.com/sbi-dev/sbi/compare/v0.24.0...v0.25.0
166+
3167
## v0.24.0
4168

5169
### ✨ Highlights

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
## `sbi`: Simulation-Based Inference
1111

12-
[Getting Started](https://sbi-dev.github.io/sbi/latest/tutorials/00_getting_started/) |
13-
[Documentation](https://sbi-dev.github.io/sbi/) | [Discord Server](https://discord.gg/eEeVPSvWKy)
12+
[Getting Started](https://sbi.readthedocs.io/en/latest/tutorials/00_getting_started.html) |
13+
[Documentation](https://sbi.readthedocs.io/en/latest/) | [Discord Server](https://discord.gg/eEeVPSvWKy)
1414

1515
`sbi` is a Python package for simulation-based inference, designed to meet the needs of
1616
both researchers and practitioners. Whether you need fine-grained control or an

docs/README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# Documentation
22

3-
To build the sphinx documentation, run
3+
## Building and serving the documentation locally
4+
5+
To build the Sphinx documentation with autoreload (recommended for development):
6+
7+
```bash
8+
# Install documentation dependencies
9+
uv sync --extra doc
10+
11+
# Start development server with autoreload
12+
sphinx-autobuild . _build/html
413
```
14+
15+
This will automatically rebuild the documentation when you make changes and serve it locally (usually at `http://127.0.0.1:8000`).
16+
17+
Alternatively, for a one-time build and simple HTTP server:
18+
19+
```bash
520
make html && python -m http.server --directory _build/html
621
```
7-
This will find all jupyter notebooks, run them, collect the output, and incorporate them into the documentation.
22+
23+
The autoreload method is recommended as it will find all Jupyter notebooks, run them, collect the output, and incorporate them into the documentation, while automatically rebuilding when you make changes.

docs/contributing.md

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -61,29 +61,19 @@ git clone git@github.com:$USERNAME/sbi.git
6161
cd sbi
6262
```
6363

64-
**Step 4**: Install a recent version of Python (we currently recommend 3.10)
65-
for instance using [`miniforge`](https://github.com/conda-forge/miniforge). We
66-
strongly recommend you create a specific `conda` environment for doing
67-
development on `sbi` as per:
64+
**Step 4**: Set up your development environment. Follow the [installation
65+
instructions](installation.md) to install Python and create a virtual environment with
66+
`uv`.
6867

69-
```bash
70-
conda create -n sbi_dev python=3.10
71-
conda activate sbi_dev
72-
```
73-
74-
**Step 5**: Install `sbi` in editable mode with
68+
**Step 5**: Install `sbi` in editable mode with development dependencies:
7569

7670
```bash
77-
pip install -e ".[dev]"
71+
uv pip install -e ".[dev]"
7872
```
7973

80-
This installs the `sbi` package into the current environment by creating a
81-
link to the source code directory (instead of copying the code to pip’s `site_packages`
82-
directory, which is what normally happens). This means that any edits you make
83-
to the `sbi` source code will be reflected the next time you open a Python interpreter
84-
and `import sbi` (the `-e` flag of pip stands for an “editable” installation,
85-
and the `dev` flag installs development and testing dependencies). This requires
86-
at least Python 3.8.
74+
This installs the `sbi` package in editable mode, meaning changes to the source code
75+
will be immediately reflected when you import `sbi`, along with all development and
76+
testing dependencies.
8777

8878
**Step 6**: Add the upstream remote. This saves a reference to the main `sbi`
8979
repository, which you can use to keep your repository synchronized with the latest
@@ -106,7 +96,6 @@ upstream git@github.com:sbi-dev/sbi.git (push)
10696
**Step 7**: Install `pre-commit` to run code style checks before each commit:
10797

10898
```bash
109-
pip install pre-commit
11099
pre-commit install
111100
```
112101

@@ -270,33 +259,25 @@ test suite in `tests/test_bm.py`.
270259

271260
## Contributing to the documentation
272261

273-
Most of the documentation for `sbi` is written in markdown and the website is generated
274-
using `mkdocs` with `mkdocstrings` and `mike`. The tutorials and examples are converted
275-
from jupyter notebooks into markdown files to be shown on the website. To work on
276-
improvements of the documentation, you should first install the `doc` dependencies:
262+
Most of the documentation for `sbi` is written in reStructuredText and the website is
263+
generated using `Sphinx`. The tutorials and examples are Jupyter notebooks that are
264+
automatically converted during the build process. To work on improvements of the
265+
documentation, you should first install the `doc` dependencies:
277266

278267
```bash
279-
pip install -e ".[doc]"
268+
uv sync --extra doc
280269
```
281270

282-
Then, you can build the website locally by executing in the `docs` folder
271+
Then, you can build and serve the website locally by executing in the `docs` folder
283272

284273
```bash
285-
mkdocs serve
274+
sphinx-autobuild . _build/html
286275
```
287276

288-
This will build the website on a local host address shown in the terminal. Changes to
289-
the website files or a browser refresh will immediately rebuild the website.
290-
291-
If you updated the tutorials or examples, you need to convert them to markdown first:
292-
293-
```bash
294-
cd docs
295-
jupyter nbconvert --to markdown ../docs/tutorials/*.ipynb --output-dir docs/tutorials/
296-
jupyter nbconvert --to markdown ../docs/advanced_tutorials/*.ipynb --output-dir docs/tutorials/
297-
jupyter nbconvert --to markdown ../docs/how_to_guide/09_sampler_interface.ipynb --output-dir docs/tutorials/
298-
mkdocs serve
299-
```
277+
This command will automatically build the website and start a local development server with
278+
automatic rebuilding and live reload, so you can open it in your browser and see changes
279+
as you edit. Changes to the documentation files will automatically trigger a rebuild and
280+
be displayed locally.
300281

301282
### Using AI Coding Assistants
302283

docs/installation.md

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,64 @@
11
(installation)=
22
# Installation
33

4-
`sbi` requires Python 3.10 or higher. A GPU is not required, but can lead to
5-
speed-up in some cases. We recommend using a
6-
[`conda`](https://docs.conda.io/en/latest/miniconda.html) virtual environment
7-
([Miniconda installation
8-
instructions](https://docs.conda.io/en/latest/miniconda.html)). If `conda` is
9-
installed on the system, an environment for installing `sbi` can be created as
10-
follows:
11-
12-
```console
13-
# Create an environment for sbi (indicate Python 3.10 or higher); activate it
14-
$ conda create -n sbi_env python=3.10 && conda activate sbi_env
4+
`sbi` requires Python 3.10 or higher. We recommend using Python 3.12 for the best
5+
experience. A GPU is not required, but can lead to speed-up in some cases.
6+
7+
## Recommended: Installation with uv
8+
9+
We recommend using [`uv`](https://docs.astral.sh/uv)
10+
for package and environment management. If you haven't installed `uv` yet, follow
11+
the [installation instructions](https://docs.astral.sh/uv/getting-started/installation/).
12+
13+
Create a virtual environment and install `sbi`:
14+
15+
```bash
16+
# Create a virtual environment with Python 3.12
17+
uv venv --python 3.12
18+
19+
# Activate the environment (on macOS/Linux)
20+
source .venv/bin/activate
21+
22+
# On Windows
23+
# .venv\Scripts\activate
24+
25+
# Install sbi
26+
uv pip install sbi
1527
```
1628

17-
Independent of whether you are using `conda` or not, `sbi` can be installed
18-
using `pip`:
29+
## Alternative installation methods
30+
31+
### Using pip
32+
33+
If you prefer using `pip` directly:
1934

2035
```bash
2136
python -m pip install sbi
2237
```
2338

24-
To install and add `sbi` to a project with [`pixi`](https://pixi.sh/), from the project directory run
39+
### Using conda
40+
41+
To install into a conda environment:
2542

2643
```bash
27-
pixi add sbi
44+
# Create an environment for sbi (Python 3.10 or higher)
45+
conda create -n sbi_env python=3.12 && conda activate sbi_env
46+
47+
# Install sbi from conda-forge
48+
conda install --channel conda-forge sbi
2849
```
2950

30-
and to install into a particular conda environment with [`conda`](https://docs.conda.io/projects/conda/), in the activated environment run
51+
### Using pixi
52+
53+
To install and add `sbi` to a project with [`pixi`](https://pixi.sh/):
3154

3255
```bash
33-
conda install --channel conda-forge sbi
56+
pixi add sbi
3457
```
3558

36-
To test the installation, drop into a Python prompt and run
59+
## Testing the installation
60+
61+
To test the installation, drop into a Python prompt and run:
3762

3863
```python
3964
from sbi.examples.minimal import simple

0 commit comments

Comments
 (0)