danielenricocahall / elephas

Distributed Deep learning with Keras & Spark
MIT License
17 stars 5 forks source link

Parameters passed to SGD optimizer in example deprecated in latest keras versions #15

Closed nmoran closed 1 year ago

nmoran commented 1 year ago

Describe the bug After installing elephas in a fresh python environment and trying to run the ml_mlp_classification.py example, I got following error

ValueError: decay is deprecated in the new Keras optimizer, pleasecheck the docstring for valid arguments, or use the legacy optimizer, e.g., tf.keras.optimiz
ers.legacy.SGD.

Would be good to update the example or pin keras to an older version in the requirements.txt.

To Reproduce From clean python 3.8 environment on ubuntu 20.04

pip install elephas
spark-submit --driver-memory 1G ./ml_mlp_classification.py

Expected behavior Example should run.

Desktop (please complete the following information):

Additional context keras==2.11.0

danielenricocahall commented 1 year ago

Hello @nmoran , thank you for the test! Similar to the other issue, it looks like we are not compatible with Tensorflow 2.11. I have pinned the version to <=2.10 in the dependencies. Please test the latest (3.4.6) when you get the chance!

nmoran commented 1 year ago

Thanks @danielenricocahall , working with these changes now!