btmartin721 / PG-SUI

Python machine learining API to impute missing genotypes from population genomic data
GNU General Public License v3.0
3 stars 1 forks source link

Version Incompatibility with Keras 3/ Tensorflow 2.16 #29

Open btmartin721 opened 6 months ago

btmartin721 commented 6 months ago

Will not run with Keras v3 and Tensorflow v2.16.

Here's the error:

ImportError: `keras.optimizers.legacy` is not supported in Keras 3. When using `tf.keras`, to continue using a `tf.keras.optimizers.legacy` optimizer, you can install the `tf_keras` package (Keras 2) and set the environment variable `TF_USE_LEGACY_KERAS=True` to configure TensorFlow to use `tf_keras` when accessing `tf.keras`.

Temporary solution: downgrade keras and tensorflow to keras v2.15 and tensorflow v2.15

pip uninstall keras
pip uninstall tensorflow
pip install keras==2.15 tensorflow==2.15
tkchafin commented 6 months ago

We had previously discussed switching to PyTorch -- maybe sometime in the Fall when we have time we should look at how viable that would be