Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump up to Series 1.1.5 update #143

Merged
merged 29 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0873ba9
update tutorial notebook 1
rusty-electron Feb 5, 2024
ccfd11a
Merge pull request #120 from rusty-electron/master
stefanradev93 Feb 6, 2024
fd9b13b
manual fix for toc anchor links
rusty-electron Feb 13, 2024
8388d03
update minor text details
rusty-electron Feb 13, 2024
fe63666
Minimal Fix for Broken Tests (#130)
LarsKue Feb 20, 2024
85fee39
Drop Support for Python 3.9, Add Support for Python 3.11 (#132)
LarsKue Feb 20, 2024
6c68a18
Parallelize Tests
LarsKue Feb 20, 2024
06ee85a
Parallelize Tests
LarsKue Feb 20, 2024
801e56f
Merge remote-tracking branch 'origin/Development' into Development
LarsKue Feb 20, 2024
6db815a
add (short) note about latent vectors
rusty-electron Feb 21, 2024
d477cd4
Merge branch 'stefanradev93:Development' into Development
rusty-electron Feb 21, 2024
225a817
Merge pull request #136 from rusty-electron/Development
stefanradev93 Feb 21, 2024
674ee68
make sure that plots work with only one parameter
Kucharssim Feb 21, 2024
512046c
Merge pull request #137 from Kucharssim/oneParameterPlot
stefanradev93 Feb 27, 2024
eb35a14
Include shared context in MultiSimulationDataset for offline training
elseml Feb 27, 2024
9a5b125
Merge remote-tracking branch 'upstream/Development' into Development
elseml Feb 29, 2024
56a8dd5
Fix last epoch validation loss not saving
elseml Mar 1, 2024
3b196c6
Merge pull request #139 from elseml/Development
stefanradev93 Mar 1, 2024
7009aeb
fix: README - minimal example
vpratz Mar 5, 2024
ccb4b94
Merge pull request #141 from vpratz/Development
stefanradev93 Mar 5, 2024
162a616
update TOCs of example notebooks
rusty-electron Mar 6, 2024
4eb185c
Merge pull request #142 from rusty-electron/Development
stefanradev93 Mar 7, 2024
18d519a
Cheap fix for ts transformer test fail
stefanradev93 Mar 7, 2024
35a2b27
Update support and references
stefanradev93 Mar 7, 2024
4eb0f75
Add changes for 1.1.5 series
stefanradev93 Mar 7, 2024
066b958
Small uppercase change to journal names
stefanradev93 Mar 7, 2024
c4ccad8
Drop support for legacy SingleModelAmortizer [skip ci]
stefanradev93 Mar 7, 2024
0b866a9
Add AmortizedPointEstimator
stefanradev93 Mar 7, 2024
6508273
Add new ConfigurableMLP
stefanradev93 Mar 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# From https://github.com/eeholmes/readthedoc-test/blob/main/.github/workflows/docs_pages.yml
name: docs

# execute this workflow automatically when a we push to master
# execute this workflow automatically when we push to master
on:
push:
branches:
Expand All @@ -28,7 +28,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: 'pip'
cache: "pip"

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: python3 -m pip install --upgrade build && python3 -m build
- run: python3 -m pip install -U build && python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Tests
on:
pull_request:
push:
branches:
branches:
- master
- Development

Expand All @@ -14,17 +14,18 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9']
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
python -m ensurepip
python -m pip install -U pip setuptools wheel
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,10 @@ General Improvements:
performance.
2. Deprecate name ``SequentialNetwork`` and use ``SequenceNetwork`` instead to avoid confusion with ``tf.keras.Sequential``.
3. Change default to ``use_layer_norm=False`` of ``SetTransformer`` due to superior performance on relevant exchangeable models.


1.1.5 Series
----------
1. Fix bug failing to propagate global context variables for model comparison.
2. Major revamp of tutorials.
3. Update dependencies and continuous integration.
2 changes: 1 addition & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Full Installation Instructions
Requirements
------------

This package requires Python 3.9 or later.
This package requires Python 3.10 or later.
A simple installation is possible via `Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_,
e.g. (on Linux)

Expand Down
66 changes: 34 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For starters, check out some of our walk-through notebooks:

## Documentation \& Help

The project documentation is available at <https://bayesflow.org>. Please use the [BayesFlow Forums](https://discuss.bayesflow.org/) for any BayesFlow-related questions and discussions, and [GitHub Issues](https://github.com/stefanradev93/BayesFlow/issues) for bug reports and feature requests.
The project documentation is available at <https://bayesflow.org>. Please use the [BayesFlow Forums](https://discuss.bayesflow.org/) for any BayesFlow-related questions and discussions, and [GitHub Issues](https://github.com/stefanradev93/BayesFlow/issues) for bug reports and feature requests.

## Installation

Expand Down Expand Up @@ -73,7 +73,7 @@ def prior(D=2, mu=0., sigma=1.0):
Then, we connect the `prior` with the `simulator` using a `GenerativeModel` wrapper:

```python
generative_model = bf.simulation.GenerativeModel(prior, simulator)
generative_model = bf.simulation.GenerativeModel(prior, simulator, simulator_is_batched=False)
```

Next, we create our BayesFlow setup consisting of a summary and an inference network:
Expand Down Expand Up @@ -119,7 +119,7 @@ well-calibrated inference algorithms as indicated by the shaded gray areas.
Accordingly, our neural approximator seems to have converged to the intended target.

As you can see, amortized inference on new (real or simulated) data is easy and fast.
We can obtain further 5000 posterior draws per simulated data set and quickly inspect
We can obtain further 5000 posterior draws per simulated data set and quickly inspect
how well the model can recover its parameters across the entire *prior predictive distribution*.


Expand Down Expand Up @@ -149,7 +149,7 @@ BayesFlow: Learning complex stochastic models with invertible neural networks.
<em>IEEE Transactions on Neural Networks and Learning Systems, 33(4)</em>, 1452-1466.

- Radev, S. T., Graw, F., Chen, S., Mutters, N. T., Eichel, V. M., Bärnighausen, T., & Köthe, U. (2021).
OutbreakFlow: Model-based Bayesian inference of disease outbreak dynamics with invertible neural networks and its application to the COVID-19 pandemics in Germany. <em>PLoS computational biology, 17(10)</em>, e1009472.
OutbreakFlow: Model-based Bayesian inference of disease outbreak dynamics with invertible neural networks and its application to the COVID-19 pandemics in Germany. <em>PLoS Computational Biology, 17(10)</em>, e1009472.

- Bieringer, S., Butter, A., Heimel, T., Höche, S., Köthe, U., Plehn, T., & Radev, S. T. (2021).
Measuring QCD splittings with invertible networks. <em>SciPost Physics, 10(6)</em>, 126.
Expand Down Expand Up @@ -294,50 +294,52 @@ JANA: Jointly amortized neural approximation of complex Bayesian models.
([arXiv](https://arxiv.org/abs/2302.09125))([PMLR](https://proceedings.mlr.press/v216/radev23a.html))

## Support
This work is supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy -– EXC-2181 - 390900948 (the Heidelberg Cluster of Excellence STRUCTURES) and -- EXC-2075 - 390740016 (the Stuttgart Cluster of Excellence SimTech), the Informatics for Life initiative funded by the Klaus Tschira Foundation, and Google Cloud through the Academic Research Grants program.

This project is currently managed by researchers from Rensselaer Polytechnic Institute, TU Dortmund University, and Heidelberg University. It is partially funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation, Project 528702768). The project is further supported by Germany's Excellence Strategy -- EXC-2075 - 390740016 (Stuttgart Cluster of Excellence SimTech) and EXC-2181 - 390900948 (Heidelberg Cluster of Excellence STRUCTURES), as well as the Informatics for Life initiative funded by the Klaus Tschira Foundation.

## Citing BayesFlow

You can cite BayesFlow along the lines of:

- We approximated the posterior with neural posterior estimation and learned summary statistics (NPE; Radev et al., 2020), as implemented in the BayesFlow software for amortized Bayesian workflows (Radev et al., 2023b).
- We approximated the posterior with neural posterior estimation and learned summary statistics (NPE; Radev et al., 2020), as implemented in the BayesFlow software for amortized Bayesian workflows (Radev et al., 2023a).
- We approximated the likelihood with neural likelihood estimation (NLE; Papamakarios et al., 2019) without hand-cafted summary statistics, as implemented in the BayesFlow software for amortized Bayesian workflows (Radev et al., 2023b).
- We performed simultaneous posterior and likelihood estimation with jointly amortized neural approximation (JANA; Radev et al., 2023a), as implemented in the BayesFlow software for amortized Bayesian workflows (Radev et al., 2023b).

1. Radev, S. T., Schmitt, M., Schumacher, L., Elsemüller, L., Pratz, V., Schälte, Y., Köthe, U., & Bürkner, P.-C. (2023). BayesFlow: Amortized Bayesian workflows with neural networks. *arXiv:2306.16015*. ([arXiv](https://arxiv.org/abs/2306.16015))
1. Radev, S. T., Schmitt, M., Schumacher, L., Elsemüller, L., Pratz, V., Schälte, Y., Köthe, U., & Bürkner, P.-C. (2023a). BayesFlow: Amortized Bayesian workflows with neural networks. *The Journal of Open Source Software, 8(89)*, 5702.([arXiv](https://arxiv.org/abs/2306.16015))([JOSS](https://joss.theoj.org/papers/10.21105/joss.05702))
2. Radev, S. T., Mertens, U. K., Voss, A., Ardizzone, L., Köthe, U. (2020). BayesFlow: Learning complex stochastic models with invertible neural networks. *IEEE Transactions on Neural Networks and Learning Systems, 33(4)*, 1452-1466. ([arXiv](https://arxiv.org/abs/2003.06281))([IEEE TNNLS](https://ieeexplore.ieee.org/document/9298920))
3. Radev, S. T., Schmitt, M., Pratz, V., Picchini, U., Köthe, U., & Bürkner, P.-C. (2023). JANA: Jointly amortized neural approximation of complex Bayesian models. *Proceedings of the Thirty-Ninth Conference on Uncertainty in Artificial Intelligence, 216*, 1695-1706. ([arXiv](https://arxiv.org/abs/2302.09125))([PMLR](https://proceedings.mlr.press/v216/radev23a.html))
3. Radev, S. T., Schmitt, M., Pratz, V., Picchini, U., Köthe, U., & Bürkner, P.-C. (2023b). JANA: Jointly amortized neural approximation of complex Bayesian models. *Proceedings of the Thirty-Ninth Conference on Uncertainty in Artificial Intelligence, 216*, 1695-1706. ([arXiv](https://arxiv.org/abs/2302.09125))([PMLR](https://proceedings.mlr.press/v216/radev23a.html))

**BibTeX:**

```
@misc{radev2023bayesflow,
title = {{BayesFlow}: Amortized Bayesian workflows with neural networks},
author = {Stefan T Radev and Marvin Schmitt and Lukas Schumacher and Lasse Elsem\"{u}ller and Valentin Pratz and Yannik Sch\"{a}lte and Ullrich K\"{o}the and Paul-Christian B\"{u}rkner},
year = {2023},
publisher= {arXiv},
url={https://arxiv.org/abs/2306.16015}
@article{bayesflow_2023_software,
title = {{BayesFlow}: Amortized {B}ayesian workflows with neural networks},
author = {Radev, Stefan T. and Schmitt, Marvin and Schumacher, Lukas and Elsemüller, Lasse and Pratz, Valentin and Schälte, Yannik and Köthe, Ullrich and Bürkner, Paul-Christian},
journal = {Journal of Open Source Software},
volume = {8},
number = {89},
pages = {5702},
year = {2023}
}

@article{radev2020bayesflow,
title={{BayesFlow}: Learning complex stochastic models with invertible neural networks},
author={Radev, Stefan T. and Mertens, Ulf K. and Voss, Andreas and Ardizzone, Lynton and K{\"o}the, Ullrich},
journal={IEEE transactions on neural networks and learning systems},
volume={33},
number={4},
pages={1452--1466},
year={2020},
publisher={IEEE}
@article{bayesflow_2020_original,
title = {{BayesFlow}: Learning complex stochastic models with invertible neural networks},
author = {Radev, Stefan T. and Mertens, Ulf K. and Voss, Andreas and Ardizzone, Lynton and K{\"o}the, Ullrich},
journal = {IEEE transactions on neural networks and learning systems},
volume = {33},
number = {4},
pages = {1452--1466},
year = {2020}
}

@inproceedings{pmlr-v216-radev23a,
title = {{JANA}: Jointly amortized neural approximation of complex {B}ayesian models},
author = {Radev, Stefan T. and Schmitt, Marvin and Pratz, Valentin and Picchini, Umberto and K\"othe, Ullrich and B\"urkner, Paul-Christian},
booktitle = {Proceedings of the Thirty-Ninth Conference on Uncertainty in Artificial Intelligence},
pages = {1695--1706},
year = {2023},
volume = {216},
series = {Proceedings of Machine Learning Research},
publisher = {PMLR}
@inproceedings{bayesflow_2023_jana,
title = {{JANA}: Jointly amortized neural approximation of complex {B}ayesian models},
author = {Radev, Stefan T. and Schmitt, Marvin and Pratz, Valentin and Picchini, Umberto and K\"othe, Ullrich and B\"urkner, Paul-Christian},
booktitle = {Proceedings of the Thirty-Ninth Conference on Uncertainty in Artificial Intelligence},
pages = {1695--1706},
year = {2023},
volume = {216},
series = {Proceedings of Machine Learning Research},
publisher = {PMLR}
}
```
Loading