stefanradev93 / BayesFlow

A Python library for amortized Bayesian workflows using generative neural networks.
https://bayesflow.org/
MIT License
286 stars 45 forks source link

Backport dependency fixes to releases/master #149

Closed vpratz closed 4 months ago

vpratz commented 4 months ago

As described in #148, the newest versions of tensorflow_probability and tensorflow are not compatible with bayesflow. Therefore, BayesFlow is currently broken except for Development installations. Installation via pip install bayesflow is broken and results in:

$ python               
Python 3.10.13 | packaged by conda-forge | (main, Dec 23 2023, 15:36:39) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bayesflow
[...]

Failed to import TF-Keras. Please note that TF-Keras is not installed by default when you install TensorFlow Probability. This is so that JAX-only users do not have to install TensorFlow or TF-Keras. To use TensorFlow Probability with TensorFlow, please install the tf-keras or tf-keras-nightly package.
This can be be done through installing the tensorflow-probability[tf] extra.

WARNING:root:Some dependencies failed to load. BayesFlow modules may not work properly!
WARNING:root:No module named 'tf_keras'

Backporting the changes introduced in 89717808 should fix the issue, but reupload to PyPi will be necessary.

vpratz commented 4 months ago

Resolved by #150 and the creation of release 1.1.5