Hi,
I am using a computer with Python 3.8.0. I read the release note of IBM FL 1.0.6 (on slack) and it mentions the support for Python 3.8. So, first I tried to directly install from git repository, but it breaks during pip install -r requirements.txt once the Tensorflow==1.15 neither Tensorflow==2.1 is available for Python 3.8.
Then, I downgraded to Python 3.6, upgraded pip (pip install --upgrade pip) and changed the requirements.txt from Tensorflow 1.15 to tensorflow==2.1 then the setup finished.
But, running the MNIST example from set-up guide, I got the following error after succesfully running generate_data.py:
(venv) $ python examples/generate_configs.py -f iter_avg -m keras -n 2 -d mnist -p examples/data/mnist/random
Using TensorFlow backend.
/home/gustavo/Desktop/federated-learning-lib/venv/lib/python3.6/site-packages/google/auth/crypt/_cryptography_rsa.py:22: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
import cryptography.exceptions
Finished generating config file for aggregator. Files can be found in: /home/gustavo/Desktop/federated-learning-lib/examples/configs/iter_avg/keras/config_agg.yml
Traceback (most recent call last):
File "examples/generate_configs.py", line 297, in <module>
dataset, party_data_path, folder_configs, task_name)
File "examples/generate_configs.py", line 228, in generate_party_config
'model': generate_model_config(module, model, folder_configs, dataset, party_id=i),
File "examples/generate_configs.py", line 170, in generate_model_config
model = get_model_config(folder_configs, dataset, is_agg, party_id, model=model)
File "/home/gustavo/Desktop/federated-learning-lib/examples/iter_avg/generate_configs.py", line 69, in get_model_config
return method(folder_configs, dataset, is_agg=is_agg, party_id=0)
File "/home/gustavo/Desktop/federated-learning-lib/examples/iter_avg/model_keras.py", line 24, in get_model_config
return get_mnist_model_config(folder_configs)
File "/home/gustavo/Desktop/federated-learning-lib/examples/iter_avg/model_keras.py", line 50, in get_mnist_model_config
model = Sequential()
File "/home/gustavo/Desktop/federated-learning-lib/venv/lib/python3.6/site-packages/keras/engine/sequential.py", line 87, in __init__
super(Sequential, self).__init__(name=name)
File "/home/gustavo/Desktop/federated-learning-lib/venv/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/gustavo/Desktop/federated-learning-lib/venv/lib/python3.6/site-packages/keras/engine/network.py", line 96, in __init__
self._init_subclassed_network(**kwargs)
File "/home/gustavo/Desktop/federated-learning-lib/venv/lib/python3.6/site-packages/keras/engine/network.py", line 294, in _init_subclassed_network
self._base_init(name=name)
File "/home/gustavo/Desktop/federated-learning-lib/venv/lib/python3.6/site-packages/keras/engine/network.py", line 109, in _base_init
name = prefix + '_' + str(K.get_uid(prefix))
File "/home/gustavo/Desktop/federated-learning-lib/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 74, in get_uid
graph = tf.get_default_graph()
AttributeError: module 'tensorflow' has no attribute 'get_default_graph'
Then, I also downgraded from Tensorflow 2.1 to Tensorflow 1.15. And then the set-up example using MNIST finally works! :)
So it is not clear the claim that it works with Python 3.8 and TF v2. My question is, how to effectively make IBM-FL work with TF v2 and Python 3.8 ?
I reviewed previous issues and I think that this step-by-step relates to #93 and #91
Hi,
I am using a computer with Python 3.8.0. I read the release note of IBM FL 1.0.6 (on slack) and it mentions the support for Python 3.8. So, first I tried to directly install from git repository, but it breaks during
pip install -r requirements.txtonce the Tensorflow==1.15 neither Tensorflow==2.1 is available for Python 3.8.Then, I downgraded to Python 3.6, upgraded pip (
pip install --upgrade pip) and changed therequirements.txtfrom Tensorflow 1.15 totensorflow==2.1then the setup finished.But, running the MNIST example from set-up guide, I got the following error after succesfully running
generate_data.py:Then, I also downgraded from Tensorflow 2.1 to Tensorflow 1.15. And then the set-up example using MNIST finally works! :)
So it is not clear the claim that it works with Python 3.8 and TF v2. My question is, how to effectively make IBM-FL work with TF v2 and Python 3.8 ?
I reviewed previous issues and I think that this step-by-step relates to #93 and #91