Domino Valdano created MADLIB-1450: -------------------------------------- Summary: Remove dependency on keras Key: MADLIB-1450 URL: https://issues.apache.org/jira/browse/MADLIB-1450 Project: Apache MADlib Issue Type: Improvement Components: Deep Learning Reporter: Domino Valdano Fix For: v1.18.0
Presently, we require that users install both standalone "multi-backend" `keras` and `tensorflow` python modules in order to use the DL features of madlib. But there is no good reason for the keras requirement, as keras has come included with tensorflow since 2017, starting with version `1.4.0`: [https://github.com/tensorflow/tensorflow/tree/v1.4.0/tensorflow/python/keras] In fact, the multi-backend version of keras is a dead project, no longer maintained by anyone. As it says on [https://github.com/keras-team/keras]: *Multi-backend Keras has been discontinued. At this time, we recommend that Keras users who use multi-backend Keras with the TensorFlow backend switch to {{tf.keras}}* Keras 2.2.5 was the last release to support backends other than tensorflow, now it is just maintained as a part of the tensorflow module. Because madlib 1.17.0 does not import `tensorflow` directly, users still must have the old multi-backend keras module installed in order to use our DL features. In order to fix this, dropping the keras dependency, in 1.18.0 we should switch from using: `import keras` `from keras.backend import tf` to: `import tensorflow as tf` `from tensorflow.python import keras` We can continue using both `tf` and `keras` as before, without touching anything but the import statements. Another motivation for this change is that `keras 2.2.5` no longer includes `keras.tf`, so our current method of importing only works up through `keras 2.2.4`. -- This message was sent by Atlassian Jira (v8.3.4#803005)