Build federated averaging process'

Hi,
iI have latest versions of tf and tff installed on my google colab
TensorFlow version: 2.14.1
TensorFlow Federated version: 0.74.0
working in python 3.10 using colab

but getting these kinds of issues continuously thought my code, I am stuck at this place where i am aggregation on global model this below errors occurs continuously.

AttributeError: module ‘tensorflow_federated.python.learning’ has no attribute ‘build_federated_averaging_process’

please guide me
thanks

Hi @ATI_MALIK

Welcome to the TensorFlow Forum!

I am able to install and import the TF Federated in Google Colab using TensorFlow 2.14 and Python 3.10 successfully. Could you please try again and let us know if the issue still persists. Thank you

Please have a look at the below screenshot.

1 Like

Thank U so much for you kind Rply I have TF 2.14 and python. 3.10.
after importing upgraded tff I have tff 0.75.0 but in aggregation as I already asked below errors occurs continuously my code is not executed aggregation process due to below error

AttributeError: module ‘tensorflow_federated.python.learning’ has no attribute ‘build_federated_averaging_proces

Is thier any other attribute in upgraded versions for aggregation??

or any other version which best suits for aggregation in federated learning text prediction?

Waiting for you kind Rply

@ATI_MALIK , Please refer to this replicated gist and try again executing your code.

1 Like

am currently working with TensorFlow 2.15.0 and Python 3.10.x on google colab and looking to integrate TensorFlow Federated (TFF) into my project. I have noticed that TensorFlow Federated (TFF) version 0.75 is not explicitly compatible with TensorFlow 2.15.0. Therefore, I am seeking guidance on which version of TensorFlow Federated (TFF) would be suitable and compatible with Python 3.10.x and TensorFlow 2.15.0.

i have import tff 0.75.0 but with some dependencies and conflict errors
after that these types of errors occurs continuously in local and global model training

ImportError: cannot import name ‘Model’ from ‘tensorflow_federated.python.learning’ (/usr/local/lib/python3.10/dist-packages/tensorflow_federated/python/learning/init.py)

I am also facing same issue, have you solved?

I spent a long time conducting tests myself trying to solve this problem! I searched on the Internet but haven’t found it yet! Tell me in what direction should I act?)))

Hey guys,
it has moved to algorithms, now the correct usage is:
tff.learning.algorithms.build_weighted_fed_avg()

instead of the previous

tff.learning.build_federated_averaging_process()

1 Like

Thank you for this, it worked for me