Skip to content

Commit 142ff2f

Browse files
committed
[no ci] Add advice regarding moving from v1 to v2 to README.
Raise awareness regarding missing features and incompatibility between the versions. Similar changes can be made for the docs.
1 parent 57c9ad8 commit 142ff2f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@ It provides users and researchers with:
1414
BayesFlow (version 2+) is designed to be a flexible and efficient tool that enables rapid statistical inference
1515
fueled by continuous progress in generative AI and Bayesian inference.
1616

17+
## Migrating from BayesFlow 1.x to BayesFlow 2.0+
18+
19+
You are currently looking at BayesFlow 2.0+, which is a complete rewrite of the library.
20+
While it shares the same overall goals with the 1.x versions, the API is not compatible.
21+
You can find the most recent version of BayesFlow 1.x on the `stable-legacy` branch.
22+
The latest [BayesFlow 1.x documentation](https://bayesflow.org/stable-legacy/index.html) can be accessed by selecting the "stable-legacy" entry in the version picker of the documentation.
23+
24+
> [!CAUTION]
25+
> You should not upgrade (yet) if one of the following applies:
26+
>
27+
> - You have an ongoing project that uses BayesFlow 1.x, and you do not want to allocate time for migrating to the new API.
28+
> - You require a feature that was not ported to BayesFlow 2.0+ yet. To our knowledge, this applies to:
29+
> * Two-level/Hierarchical models: `TwoLevelGenerativeModel`, `TwoLevelPrior`.
30+
> * Sensitivity analysis: functionality from the `bayesflow.sensitivity` module.
31+
> * MCMC (discontinued): The `bayesflow.mcmc` module. We are considering other options to enable the use of BayesFlow in an MCMC setting.
32+
> * Networks: `EvidentialNetwork`.
33+
> * Model misspecification detection: MMD test in the summary space (see #384).
34+
> - You have already trained models in BayesFlow 1.x, that you do not want to re-train with the new version. Loading models from version 1.x in version 2.0+ is not supported.
35+
>
36+
> If you encounter any functionality that is missing and not listed here, please let us know by opening an issue.
37+
38+
The new version brings many features, like multi-backend support via Keras3, and improved modularity and extensibility.
39+
We recommend to upgrade if none of the above conditions apply.
40+
Continue reading below for installation instructions and examples to get started.
41+
The [Moving from BayesFlow v1.1 to v2.0](examples/From_BayesFlow_1.1_to_2.0.ipynb) guide highlights how concepts and classes relate between the two versions.
42+
For additional information, please refer to the [FAQ](#faq) below.
43+
1744
## Conceptual Overview
1845

1946
<div align="center">

0 commit comments

Comments
 (0)