[ 
https://issues.apache.org/jira/browse/MADLIB-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Domino Valdano updated MADLIB-1450:
-----------------------------------
    Description: 
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 now a dead project:

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:

 
{code:python}
import keras
from keras.backend import tf
{code}
 

to:

 
{code:python}
import tensorflow as tf
from tensorflow import keras
{code}
 

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.backend.tf, so our current method of importing only works up through 
keras 2.2.4.

  was:
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:

 
{code:python}
import keras
from keras.backend import tf
{code}
 

to:

 
{code:python}
import tensorflow as tf
from tensorflow import keras
{code}
 

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.backend.tf, so our current method of importing only works up through 
keras 2.2.4.


> 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
>            Priority: Major
>             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 now a dead project:
> 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:
>  
> {code:python}
> import keras
> from keras.backend import tf
> {code}
>  
> to:
>  
> {code:python}
> import tensorflow as tf
> from tensorflow import keras
> {code}
>  
> 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.backend.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)

Reply via email to